Closed pirj closed 1 year ago
The JRuby failure seem unrelated.
Do you think it would be possible to write a test this case when some of the method that Receive pulls from MessageExpectation are still defined if someone monkey patches Object with the same ones?
Hum, not sure how we could do this, that code is only executed once, so it's very hard to unit test it, and even if we refactored it out we'd have to patch object temporarily to simulate the issue.
I get the want for a test case, but it seems very impractical here.
Any blocker on this? I don't use RSpec myself, but I assume it my be quite blocking for RSpec users who track Rails edge.
It needs a test, I've added one in #1534 but some of the builds aren't passing yet
Thanks, I didn't notice that other PR.
It was intended to be quick addition then merge but the build gods had other ideas, I'm hoping to get it merged this weekend sometime and then released. Thanks for the work on this.
Released in 3.12.4 thank you!
Fix: https://github.com/rspec/rspec-mocks/issues/1530
My understanding of this
next if method_defined?
check that there since this class was added in 08ec2e80325a5959ac13b113a0175d28aca352a8 is that it's to prevent accidentally overriding Matcher or own methods.If my understanding is correct, then we should ignore methods inherited from
Object
.