Created
May 1, 2016 21:12
-
-
Save derekgottlieb/3c0c1dad62e5e05a1e8c6c8f81603502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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