Skip to content

Instantly share code, notes, and snippets.

@derekgottlieb
Created May 1, 2016 21:12
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 derekgottlieb/3c0c1dad62e5e05a1e8c6c8f81603502 to your computer and use it in GitHub Desktop.
Save derekgottlieb/3c0c1dad62e5e05a1e8c6c8f81603502 to your computer and use it in GitHub Desktop.
describe 'object under test' do
describe 'method under test' do
it "should do the thing, but not wait so long" do
# Who doesn't like monkey patching to make tests go fast?
module Kernel
alias_method :old_sleep, :sleep
def sleep seconds
old_sleep 1
end
end
method_that_contains_a_long_sleep_due_to_real_world
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment