Open myronmarston opened 10 years ago
I understood everything in this issue description apart from: The fix may be in rspec support.
. As far as I'm aware there's not code in RSpec support to deal with this. Do you mean that a fix should end up in RSpec support, or that RSpec should start supporting users doing this with its own warning?
I understood everything in this issue description apart from: The fix may be in rspec support.. As far as I'm aware there's not code in RSpec support to deal with this. Do you mean that a fix should end up in RSpec support, or that RSpec should start supporting users doing this with its own warning?
The warning is being generated from this line of code in rspec-support, so I meant that the fix for this may be in that method. Or it may be here in rspec-mocks. I'm not sure of the best route yet.
A proposed solution for this was written in https://github.com/rspec/rspec-support/pull/63. We decided it'd be better to simply silence warnings in the RSpec support method, and unsilence them once that's done.
Produces a warning:
As always, stubbing private methods is a bad idea, but this is a confusing warning for users to get. The fix may be in rspec support.