Skip to content

Instantly share code, notes, and snippets.

@skwp
Created November 29, 2010 18:55
Show Gist options
  • Select an option

  • Save skwp/720366 to your computer and use it in GitHub Desktop.

Select an option

Save skwp/720366 to your computer and use it in GitHub Desktop.
class MyCode
def speak
"hello"
end
def do_something!
call_external_service
call_another_service("some parameter")
end
def call_another_service(args)
sleep(30)
end
# when I unit test this, I will stub it out so my
# test is not dependent on external timeouts
def call_external_service
sleep(30)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment