rails中写rspec测试代码

来源:互联网 发布:模糊控制算法论文 编辑:程序博客网 时间:2024/05/17 03:06

http://rspec.info/documentation/
gem:  rspec (1.2.6, 1.1.12)
describe & it
before & after
instance method
include module
shared_examples_for & it_should_behave_like
pending
"should ..." matcher    http://rspec.rubyforge.org/rspec/1.3.0/classes/Spec/Matchers.html
should_receive
stub

运行rspec
spec -O spec/spec.opts spec/teller_spec.rb