[rspec-users] should_receive, used in the wrong place?

Courtenay court3nay at gmail.com
Fri Aug 17 17:31:43 EDT 2007


What do you guys think of this: if someone calls should_receive
outside of an "it" block, it warns you.

  before(:each) do
    @foo = Foo.new
    @foo.should_receive(:monkeys)
  end

would warn you that you're setting an expectation in the wrong place,
and that "stub" is correct when setting up objects.

Opinions?


courtenay


More information about the rspec-users mailing list