Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given /^(.+) (\d+) (seconds?|minutes?|hours?|days?|months?|years?) (ago|from now)$/ do |string, number, time_unit, time_direction|
- Timecop.freeze(number.to_i.send(time_unit).send(time_direction.gsub(' ','_'))) do
- Given string
- end
- end
Add Comment
Please, Sign In to add comment