El 29/6/2009, a las 16:26, Ben Mabey escribió:
You probably know this, but for the benefit of others... Pat made a change a while back that makes it so the stubbed return value will still be returned even if an expectation is added. Meaning, assuming the stub is in the before block, you can change the expectation to: Comment.should_receive(:find).with(123) # this will still return @comment
I didn't know that, but it's pretty awesome. Basically means that RSpec mocks can double as proxies now. That's pretty neat.
Cheers, Wincent _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users