Put timecop into safe mode and fix leaky Timecop.freeze

This commit is contained in:
Rohan Mitchell
2016-11-25 11:18:39 +11:00
parent 57363e2da5
commit 6795237a2d
3 changed files with 6 additions and 4 deletions

View File

@@ -33,9 +33,10 @@ module Spree
end
it "defaults available_on to now" do
Timecop.freeze
product = Product.new
product.available_on.should == Time.zone.now
Timecop.freeze do
product = Product.new
product.available_on.should == Time.zone.now
end
end
describe "tax category" do