Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display fuller details of the stub aspect of each expectation in the error message #179

Open
floehopper opened this issue Jan 5, 2014 · 0 comments

Comments

@floehopper
Copy link
Member

See #167. In particular the idea is to include things like the return values, exceptions to raise, etc. I'm thinking along the following lines:

foo = mock('foo')
foo.expects(:bar).with(1).returns('a')
foo.expects(:bar).with(2).returns('b').then.returns('c').then.raises(StandardError)

3.times { foo.bar(2) }
foo.bar(3)
unexpected invocation: #<Mock:foo>.bar(3)
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:foo>.expects(:bar).with(1).returns('a')
satisfied expectations:
- allowed any number of times, invoked 3 times: #<Mock:foo>.expects(:bar).with(2).returns('b').then.returns('c').then.raises(StandardError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant