rspec-mocks icon indicating copy to clipboard operation
rspec-mocks copied to clipboard

Any instance expectations with super/sub classes and nested blocks leak stubs.

Open JonRowe opened this issue 7 years ago • 2 comments

When using nested method calls and blocks, stubbing a super class method will leak into the child class for the duration of the block. First reported on rspec/rspec-core#2563 (with reproduction over at https://github.com/jcavalieri/rspec_issue).

Attached commit demonstrates the issue.

JonRowe avatar Sep 12 '18 21:09 JonRowe

Hello Jon

How do you want to proceed? This PR needs the fix too?

Thanks

benoittgt avatar Sep 17 '18 05:09 benoittgt

@benoittgt This PR is just demonstrating the issue, it still needs fixing.

JonRowe avatar Sep 17 '18 09:09 JonRowe