Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Created June 25, 2012 20:03
Show Gist options
  • Select an option

  • Save steveklabnik/2990905 to your computer and use it in GitHub Desktop.

Select an option

Save steveklabnik/2990905 to your computer and use it in GitHub Desktop.
A question about testing stuffs
def foo(arg)
@collaborator.foo(arg)
rescue
@collaborator.set_auth_credentials(credentials)
@collaborator.foo(arg)
end
# How can I make foo throw an exception the first time, but not the second time? The test currently loops infinitely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment