Saturday, 15 June 2013

rspec3 - How do I unstub in rspec 3 without enabling the old syntax? -



rspec3 - How do I unstub in rspec 3 without enabling the old syntax? -

i upgrading rspec 2 rspec 3 , utilize new syntax , not enable old syntax. have few stubs set in top-level before(:each) block selectively unstub want original implementation.

is there equivalent way remove stub when i've defined new allow syntax?

you redifine them with

expect(person).to receive(:find).and_call_original

which additionaly check original :find method called on person

rspec rspec3

No comments:

Post a Comment