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

RR omits "unexpected method invocation" when exceptions are caught #3

Open
trogdoro opened this issue May 9, 2009 · 1 comment
Open
Labels

Comments

@trogdoro
Copy link

trogdoro commented May 9, 2009

If I have "mock(A).b(2)" and "A.b(3)" is invoked instead, RR clues me in on this by listing "b(3)" under "unexpected method invocation". However, if the code being tested has "rescue nil" after the line being stubbed, it doesn't. It appears from this that RR relies on your code allowing exceptions to float up to the top. RSpec must have another mechanism, since it was able to handle the same code (reporting the invalid call).

@btakita
Copy link
Owner

btakita commented Aug 17, 2009

I suppose a throw could be used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants