Displaying 1 result from an estimated 1 matches for "verify_mocks".
2007 Mar 12
10
using mocha with rspec
...yway, here is the incantation I ended up using in my equivalent of a
test_helper.rb file that I include in all my spec files:
# replace rspec''s mocks with mocha
require ''mocha''
module Spec
module Mocks
remove_method :mock
remove_method :stub
remove_method :verify_mocks if method_defined? :verify_mocks
include Mocha::AutoVerify
end
end
Now I have working mock(), stub() and verify_mocks(). Not sure what
other Mocha stuff I''m missing yet, but I''ll let you know how I get on.
I noticed that Mocha::Standalone also references
Mocha::SetupAndT...