-
Notifications
You must be signed in to change notification settings - Fork 10
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
Stubbed/Spied inherited class methods are not correctly restored after Gimme.reset #15
base: master
Are you sure you want to change the base?
Stubbed/Spied inherited class methods are not correctly restored after Gimme.reset #15
Conversation
Added specs that expose the bug. No fix as yet. |
I would love some comments on this code. I'm not sure how I feel about it. I'm especially concerned about how ruby handles |
@@ -29,7 +29,7 @@ def self.destroy | |||
|
|||
context "upon reset" do | |||
When { Gimme.reset } | |||
Then { invocation.should raise_error } | |||
Then { invocation.should raise_error /unimplemented feature/ } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the thinking here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to prevent false negatives. The method invocation itself should raise "unimplemented feature" when invoked. However, in cases of inherited class methods (both stubbed and spied), it was actually raising a TypeError due to the attempt of rebinding the method on the wrong object. So the tests passed, but they shouldn't have.
Changes Unknown when pulling 5ac9ab0 on jasonkarns:restores_inherited_class_methods into * on searls:master*. |
This issue has been verified on ree-1.8.7, but does not exist on ruby-1.9.3