Skip to content

Commit

Permalink
Move Timecop.return to global after
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaclayton committed Jun 22, 2012
1 parent 71435ee commit 3a8307a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions spec/acceptance/build_stubbed_spec.rb
Expand Up @@ -118,8 +118,6 @@
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
Expand Down
1 change: 0 additions & 1 deletion spec/factory_girl/strategy/stub_spec.rb
Expand Up @@ -7,7 +7,6 @@

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
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Expand Up @@ -20,6 +20,7 @@
config.include DeclarationMatchers

config.after do
Timecop.return
FactoryGirl.reload
end
end

0 comments on commit 3a8307a

Please sign in to comment.