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
rails中写rspec测试代码
最新推荐文章于 2025-11-26 11:28:31 发布
本文介绍RSpec的基本用法,包括describe & it、before & after等模块的使用方法,并提供了RSpec匹配器、stub及should_receive等高级功能的链接。此外还简要说明了如何运行RSpec测试。
2916

被折叠的 条评论
为什么被折叠?



