You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is actually an rspec 2 issue, but I'm recording it here for others reference.
The config.mock_with method in rspec 2 takes a symbol or string instead of a module and has a hard coded list of acceptable mocking frameworks, so passing the NotAMock adaptor does nothing.
This prevents stubs and mocks from being reset after each example.
The work around until (if?) rspec allows arbitrary mocking frameworks again is to add the following code to spec_helper.rb
config.before(:each) do
NotAMock::CallRecorder.instance.reset
NotAMock::Stubber.instance.reset
end
The text was updated successfully, but these errors were encountered:
This is actually an rspec 2 issue, but I'm recording it here for others reference.
The config.mock_with method in rspec 2 takes a symbol or string instead of a module and has a hard coded list of acceptable mocking frameworks, so passing the NotAMock adaptor does nothing.
This prevents stubs and mocks from being reset after each example.
The work around until (if?) rspec allows arbitrary mocking frameworks again is to add the following code to spec_helper.rb
The text was updated successfully, but these errors were encountered: