|
RSpec is a behavior-driven development (BDD) framework for the Ruby programming language, inspired by JBehave.〔Ed Gibbs, (JBehave and RSpec History ) (Blog entry)〕 It contains its own mocking framework that is fully integrated into the framework based upon JMock. The framework can be considered a domain-specific language (DSL) and resembles a natural language specification. ==Usage Examples== #Testing for our User class describe User do context 'with admin privileges' do before :each do @admin = Admin.get(1) end it 'should exist' do expect(@admin).not_to be_nil end it 'should have a name' do expect(@admin.name).not_to be_false end end #... end 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「RSpec」の詳細全文を読む スポンサード リンク
|