Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with rspec 2.x #2

Open
yob opened this issue Dec 4, 2010 · 0 comments
Open

Not compatible with rspec 2.x #2

yob opened this issue Dec 4, 2010 · 0 comments

Comments

@yob
Copy link

yob commented Dec 4, 2010

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant