and_call_original does not always properly restore the method
Created by: myronmarston
I discovered this while working on #612, when I migrated some specs from using unstub
to using and_call_original
. I marked the ones that failed as pending
:
unstubbing with `and_call_original` restores the correct implementations when stubbed and unstubbed on a parent and child class
# not working for `and_call_original` yet, but works with `unstub`
# ./spec/rspec/mocks/stub_implementation_spec.rb:57
#any_instance unstubbing using `and_call_original` removes stubs even if they have already been invoked
# not working for `and_call_original` yet, but works with `unstub`
# ./spec/rspec/mocks/any_instance_spec.rb:296
#any_instance unstubbing using `and_call_original` removes stubs from sub class after invokation when super class was originally stubbed
# not working for `and_call_original` yet, but works with `unstub`
# ./spec/rspec/mocks/any_instance_spec.rb:306