aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-29 22:41:30 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-30 10:17:48 -0200
commit7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3 (patch)
tree81baf07d5fe1ec652a6b4de25dbe95da38b432da /activerecord
parent6b16c2788186d45c70bd1d9fc476407e3e265439 (diff)
downloadrails-7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3.tar.gz
rails-7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3.tar.bz2
rails-7abb6e00c0f1d6cc98b10b0e7620dfb9786449a3.zip
Remove automatic removal of Date/Time stubs after each test case
This behavior is only work out-of-box with minitest and also add a downside to run after each test case, even if we don't used the travel or travel_to methods
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/mixin_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/cases/mixin_test.rb b/activerecord/test/cases/mixin_test.rb
index ad0d5cce27..7ddb2bfee1 100644
--- a/activerecord/test/cases/mixin_test.rb
+++ b/activerecord/test/cases/mixin_test.rb
@@ -6,10 +6,14 @@ end
class TouchTest < ActiveRecord::TestCase
fixtures :mixins
- def setup
+ setup do
travel_to Time.now
end
+ teardown do
+ travel_back
+ end
+
def test_update
stamped = Mixin.new