Is there a way that I can configure RSpec to raise an error when I try to drown / mock a nonexistent method.
So, if I have a class
class A
def foo
end
end
and I write something like:
describe A do
describe '#foo' do
it 'foos' do
expect(subject).to receive(foo2)
subject.foo
end
end
end
then RSpec will not work on the first line
expect(subject....
telling me that :foo2it is not the message to which it responds subject.
source
share