-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
unstub fails with subclasses #69
Comments
aakashd
added a commit
to aakashd/rspec-mocks
that referenced
this issue
Jun 9, 2012
I have written a spec which verifies the issue and explains my understanding of how the API should behave. Please verify if it's correct. I will start working on the issue. |
Also, if I change the sequence of stubbing, it works perfectly fine. Child.stub(:new)
Parent.stub(:new)
Child.unstub(:new)
Parent.unstub(:new)
Child.new.should be_an_instance_of Child I don't yet know exactly what it means, but it's a start. |
That spec looks like it'll correctly test the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you unstub a parent class and then a child class, the child class will be given methods from the parent. e.g.
The text was updated successfully, but these errors were encountered: