Skip to content

Instantly share code, notes, and snippets.

@iamvery
Last active August 29, 2015 13:56
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 iamvery/8814676 to your computer and use it in GitHub Desktop.
Save iamvery/8814676 to your computer and use it in GitHub Desktop.
describe 'time' do
it 'fails here' do
time1 = Time.now
sleep(0.1)
time2 = Time.now
expect(time1).to be_within(0.1).of(time2)
end
it 'passes here' do
time1 = Time.now
sleep(0.1)
time2 = Time.now
expect(time1).to be_within(0.2).of(time2)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment