Skip to content

Instantly share code, notes, and snippets.

@NigelThorne
Created April 14, 2009 00:29
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 NigelThorne/94849 to your computer and use it in GitHub Desktop.
Save NigelThorne/94849 to your computer and use it in GitHub Desktop.
# this fails "Mock 'x' expected :a with (any args) once, but received it twice"
x = mock("x")
x.should_receive(:a).ordered
x.should_receive(:b).ordered
x.should_receive(:a).ordered
x.a
x.b
x.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment