Skip to content

Instantly share code, notes, and snippets.

@danielmorrison
Created November 4, 2009 12:06
Show Gist options
  • Save danielmorrison/225991 to your computer and use it in GitHub Desktop.
Save danielmorrison/225991 to your computer and use it in GitHub Desktop.
# just add a gem dependency for Timecop or require it yourself
Given 'the time is $time' do |time|
Timecop.freeze Time.parse(time)
end
When '$time pass' do |time|
Timecop.travel future_time(time)
Given 'delayed jobs are run' # we use delayed jobs and have some that get scheduled in the future.
end
When 'time stands still' do
Timecop.freeze Time.now
end
@eostrom
Copy link

eostrom commented Sep 15, 2010

What's future_time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment