Warn on stubbing nonexistent method?

Hello.
Perhaps rspec-mocks could warn if it stubs a not yet existing method?

class A
end

describe RSpec do
it ‘should’ do
a = A.new
a.stub!(:nonexistent_method) {}
end
end

This might help the development process by pointing out possible
discrepancies between rspec tests and the code (for when refactoring
wasn’t performed fully et al).
Cheers!
-roger-

On Aug 26, 2011, at 12:02 PM, Roger P. wrote:

Hello.
Perhaps rspec-mocks could warn if it stubs a not yet existing method?

See Undefined method stub report · Issue #15 · rspec/rspec-mocks · GitHub

Cheers,
David

Roger,

Check the list archives - this topic is brought up every other 3 months
:slight_smile: