【发布时间】:2012-06-07 23:56:26
【问题描述】:
任何想法为什么会这样:
it {view.should_receive(:update_method)}
但这不是?:
subject { view }
it { should_receive(:update_method) }
其他一切都一样。我收到此错误:
Failure/Error: it {should_receive(:update_method)
(#<RSpec::Core::ExampleGroup::Nested_1:0x7faf27602d58>).update_method
expected: 1 time
received: 0 times
但我不知道 RSpec::Core::ExampleGroup::Nested.... 指的是什么。有什么想法吗?
提前致谢!
【问题讨论】:
标签: ruby-on-rails testing rspec rspec-rails