Skip to content

Instantly share code, notes, and snippets.

@descentintomael
Created August 16, 2013 02:40
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 descentintomael/6246800 to your computer and use it in GitHub Desktop.
Save descentintomael/6246800 to your computer and use it in GitHub Desktop.
What to add to your environment.rb to make rails server start in another time.
days = ENV['TIMECOP_DAYS'].nil? ? 0 : ENV['TIMECOP_DAYS'].to_i
minutes = ENV['TIMECOP_MINUTES'].nil? ? 0 : ENV['TIMECOP_MINUTES'].to_i
Timecop.travel Time.now + days.days
Timecop.travel Time.now + minutes.minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment