aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-12-04 14:05:36 -0500
committerGitHub <noreply@github.com>2018-12-04 14:05:36 -0500
commitbd62389307e138ee0f274a9d62697567a3334ea0 (patch)
tree817786d8f8ab3e64c22878305aac241d29b0d7ae
parentec66c6a2fa4ee200259341a18ecd96310f388ba3 (diff)
parentdcbf44e8aeed1bbca1065be6b0ba1ddf234b93b0 (diff)
downloadrails-bd62389307e138ee0f274a9d62697567a3334ea0.tar.gz
rails-bd62389307e138ee0f274a9d62697567a3334ea0.tar.bz2
rails-bd62389307e138ee0f274a9d62697567a3334ea0.zip
Merge pull request #34560 from gmcgibbon/fix_decorate_leak_on_serial_attr_test
Fix attribute decoration leak on serialized attribute test
-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