removed the Proc.new around the timecop-cleanup: now the time is actually reset after each run.

pull/1215/head
Stefan Frank 11 years ago
parent 4c381b99b4
commit 2dd2e3eac7
  1. 4
      features/step_definitions/timecop_steps.rb

@ -44,7 +44,7 @@ end
Given /^the date is "(.*?)"$/ do |date|
new_time = Time.parse date
Timecop.freeze(new_time)
Timecop.travel(new_time)
# Ensure timecop returns after each scenario
Support::ResetTimecop.reset_after
@ -54,10 +54,8 @@ module Support
module ResetTimecop
def self.reset_after
Support::Cleanup.to_clean do
Proc.new do
Timecop.return
end
end
end
end
end

Loading…
Cancel
Save