Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itspriddle/2210095 to your computer and use it in GitHub Desktop.
Save itspriddle/2210095 to your computer and use it in GitHub Desktop.
Demonstrates unexpected behavior from .any_instance
require 'rspec/mocks'
describe Object do
it "should not care how many times a stubbed method is called" do
Object.should_receive(:some_method).any_number_of_times
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment