Created
December 5, 2010 03:39
-
-
Save sbellware/728743 to your computer and use it in GitHub Desktop.
Implicit Expectations Work Differently
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
| # See the spec report at: http://screencast.com/t/lzXadGVp | |
| # sample class to mock and test against | |
| class Thing | |
| def foo | |
| bar | |
| end | |
| def bar | |
| end | |
| end | |
| describe Thing do | |
| after do | |
| subject.foo | |
| end | |
| # this one works | |
| it { subject.should_receive :bar } | |
| # this one doesn't | |
| it { should_receive :bar } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment