[rspec-users] should_receive break the method chain?

Zhenning Guan lists at ruby-forum.com
Thu Jul 29 08:46:50 EDT 2010


class A
def process
  @b.calculate
end
end


it 'should change b calculate value' do
  @b.should_receive(:calculate)
  @a.process

  @b.calculae_value.should == 'after_calculae'
end

it will fail, if I comment out #@b.should_receive(:calculate), the test
pass,
or if comment out #@b.calculae_value.should == 'after_calculae', also
pass.

so my colleague said maybe should_receive break the mehod chain and
return.
thing is really going this way?
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list