undefined method `rspec_reset' with rspec version 2.14
I am trying execute test cases with rspec version for which I am getting
following error
undefined method `rspec_reset' for
Please note that I am trying to use rspec_reset on the class. The same
test cases are working fine with rspec 2.13.1. So is it possible that
rspec_reset method is not available for the versions greater than 2.13?
The reset method does not exist in RSpec 2.14.x. Instead, it is a helper method defined inside the spec_helper.rb file for the rspec-mocks project.
ReplyDeletemodule VerifyAndResetHelpers
def verify(object)
RSpec::Mocks.proxy_for(object).verify
end
def reset(object)
RSpec::Mocks.proxy_for(object).reset
end
end