项目 >> Rails >> RSpec

RSpec

RSpecRSpec is a framework which provides programmers with a Domain Specific Language to describe the behaviour of Ruby code with readable, executable examples that guide you in the design process and serve well as both documentation and tests.

Homepage: http://rspec.rubyforge.org/

Loading...

RSpec Examples

Here is an example of an RSpec spec: require File.dirname(__FILE__) + '/spec_helper' require File.dirname(__FILE__) + "/stack" describe "non-empty Stack", :shared => true do # NOTE that this one auto-generates the description "should not be empty" it { @stack.should_not be_empty } it ...