Created
October 7, 2011 18:28
-
-
Save mstahl/1271019 to your computer and use it in GitHub Desktop.
Simple Cucumber test steps for using Delorean for time travel
This file contains hidden or 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
When /^(?:I )?travel (?:forward|backward) in time to (\d+) (years?|months?|weeks?|days?) (from now|ago)$/ do |amount, unit, direction| | |
Delorean.time_travel_to (amount.to_i).send(unit.to_sym).send(direction.gsub(/\s/, "_").to_sym) | |
end | |
Then /^(?:I )?travel in time to the present$/ do | |
Delorean.back_to_the_present | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment