Created
August 21, 2012 01:49
-
-
Save mkb/3410491 to your computer and use it in GitHub Desktop.
RSpec expectations don't call the original method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This line in my test... | |
| EY::Statsd.should_receive(:push) | |
| # ...causes this line in my app to fail... | |
| EY::Statsd.push(:keymaster).increment | |
| # The fix is... | |
| EY::Statsd.should_receive(:push).and_return(stub(:increment => nil)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment