Rspec 1.1.4版的新特性

Rspec新版本发布了。来看看它又带来了什么。 hash_including方法,它能让开发者在Mock接受参数时不用指定所有参数,只须要指定应包含某个键值对。示例代码以下:# beforeaccount.should_receive(:deposit).with({:amount => 37.42, :date => anything()})# in 1.1.4account.should_re
相关文章
相关标签/搜索