aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-11-28 14:34:19 -0500
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2018-11-29 10:50:33 -0500
commitdcbf44e8aeed1bbca1065be6b0ba1ddf234b93b0 (patch)
tree8f22adce6fddd34352f77705022a42a251a49c58 /activerecord
parent9c6e362a632b15dd4f56534b30144926c29fa323 (diff)
downloadrails-dcbf44e8aeed1bbca1065be6b0ba1ddf234b93b0.tar.gz
rails-dcbf44e8aeed1bbca1065be6b0ba1ddf234b93b0.tar.bz2
rails-dcbf44e8aeed1bbca1065be6b0ba1ddf234b93b0.zip
Fix attribute decoration leak on serialized attribute test
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/serialized_attribute_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb
index 1192b30b14..08ab4dc600 100644
--- a/activerecord/test/cases/serialized_attribute_test.rb
+++ b/activerecord/test/cases/serialized_attribute_test.rb
@@ -13,6 +13,10 @@ class SerializedAttributeTest < ActiveRecord::TestCase
MyObject = Struct.new :attribute1, :attribute2
+ # NOTE: Use a duplicate of Topic so attribute
+ # changes don't bleed into other tests
+ Topic = ::Topic.dup
+
teardown do
Topic.serialize("content")
end