Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Created June 25, 2012 20:03
Embed
What would you like to do?
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