Sha256: e08406fcecfb7135c85c0e1e78914888e487718efba81ca6f0ddbfe83f001692

Contents?: true

Size: 401 Bytes

Versions: 3

Compression:

Stored size: 401 Bytes

Contents

#!/usr/bin/env ruby

require 'delorean'
require 'chronic'
require 'active_support/time'

When /^(.+) passes$/ do |time|
  period = Chronic.parse("#{time} from now")
  RedisDelorean.time_travel_to(period)
end

Given /^the timezone is (.*)$/ do |tz|
  Time.zone = tz
  Chronic.time_class = Time.zone
end

Given /^the time is (.*)$/ do |time|
  RedisDelorean.time_travel_to(Chronic.parse("#{time}"))
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
flapjack-2.0.0 features/steps/time_travel_steps.rb
flapjack-2.0.0rc1 features/steps/time_travel_steps.rb
flapjack-2.0.0b1 features/steps/time_travel_steps.rb