Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试翻译一些旧的 rspec 测试 (v 2.1) 以使用最新版本的 rspec (3.1) 并在这一行遇到一些麻烦......
subject.should_receive(:damage).with(10)v3.0 的语法是什么?
subject.should_receive(:damage).with(10)
新语法如下:
expect(subject).to receive(:damage).with(10)
欲了解更多信息,请阅读这篇文章