mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Move Timecop.return to global after
This commit is contained in:
parent
71435ee24c
commit
3a8307abbe
3 changed files with 1 additions and 3 deletions
|
@ -118,8 +118,6 @@ describe "defaulting `created_at`" do
|
|||
Timecop.freeze Time.now
|
||||
end
|
||||
|
||||
after { Timecop.return }
|
||||
|
||||
it "defaults created_at for objects with created_at" do
|
||||
build_stubbed(:thing_with_timestamp).created_at.should == Time.now
|
||||
end
|
||||
|
|
|
@ -7,7 +7,6 @@ describe FactoryGirl::Strategy::Stub do
|
|||
|
||||
context "asking for a result" do
|
||||
before { Timecop.freeze(Time.now) }
|
||||
after { Timecop.return }
|
||||
let(:result_instance) do
|
||||
define_class("ResultInstance") do
|
||||
attr_accessor :id
|
||||
|
|
|
@ -20,6 +20,7 @@ RSpec.configure do |config|
|
|||
config.include DeclarationMatchers
|
||||
|
||||
config.after do
|
||||
Timecop.return
|
||||
FactoryGirl.reload
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue