aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-05-30 07:00:00 +0200
committerGitHub <noreply@github.com>2017-05-30 07:00:00 +0200
commit612b54b96a8c401d186c1b0e2931b47df6eb2abc (patch)
tree558156119e317562c652044a814e75d7bc9d775e
parente1758b5e8c8d49fdf931b0b3f8009810880113a6 (diff)
parent966715d52811578f5fbbe63e2c5c441971f91b6f (diff)
downloadrails-612b54b96a8c401d186c1b0e2931b47df6eb2abc.tar.gz
rails-612b54b96a8c401d186c1b0e2931b47df6eb2abc.tar.bz2
rails-612b54b96a8c401d186c1b0e2931b47df6eb2abc.zip
Merge pull request #29277 from y-yagi/reset_time_zone_to_previous_value
Reset time zone to previous value
-rw-r--r--activesupport/test/current_attributes_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/test/current_attributes_test.rb b/activesupport/test/current_attributes_test.rb
index 67ef6ef619..a1f3b33444 100644
--- a/activesupport/test/current_attributes_test.rb
+++ b/activesupport/test/current_attributes_test.rb
@@ -28,7 +28,14 @@ class CurrentAttributesTest < ActiveSupport::TestCase
end
end
- setup { Current.reset }
+ setup do
+ @original_time_zone = Time.zone
+ Current.reset
+ end
+
+ teardown do
+ Time.zone = @original_time_zone
+ end
test "read and write attribute" do
Current.world = "world/1"