Hi-
She talks about using a mocking library that protects against API drift by checking that the mock has the same contract. Is there any way to do this in Mocha?
This test passes, but I'd like it to blow up saying you can't mock a method that's not on the underlying object. --
class Foo
end
describe Foo do
it 'should mock' do
f=Foo.new
# mock a non-existent method.
f.expects(:missing_method).with(1).returns(1)
f.missing_method(1).must_equal 1
end
end
Thanks