Skip to content
This repository
Browse code

Move test to the correct file

  • Loading branch information...
commit 258461ee333ab6bcec983362f46e271fca9f3614 1 parent df1d21a
Rafael Mendonça França authored
6  activerecord/test/cases/attribute_methods_test.rb
@@ -734,6 +734,12 @@ def test_list_of_serialized_attributes
734 734
     assert_equal %w(preferences), Contact.serialized_attributes.keys
735 735
   end
736 736
 
  737
+  def test_serialized_attributes_are_class_level_settings
  738
+    topic = Topic.new
  739
+    assert_raise(NoMethodError) { topic.serialized_attributes = [] }
  740
+    assert_deprecated { topic.serialized_attributes }
  741
+  end
  742
+
737 743
   def test_instance_method_should_be_defined_on_the_base_class
738 744
     subklass = Class.new(Topic)
739 745
 
6  activerecord/test/cases/base_test.rb
@@ -1310,6 +1310,12 @@ def test_serialized_attribute
1310 1310
     assert_equal(myobj, topic.content)
1311 1311
   end
1312 1312
 
  1313
+  def test_serialized_attribute_init_with
  1314
+    topic = Topic.allocate
  1315
+    topic.init_with('attributes' => { 'content' => '--- foo' })
  1316
+    assert_equal 'foo', topic.content
  1317
+  end
  1318
+
1313 1319
   def test_serialized_attribute_in_base_class
1314 1320
     Topic.serialize("content", Hash)
1315 1321
 
12  activerecord/test/cases/serialization_test.rb
@@ -18,12 +18,6 @@ def setup
18 18
     }
19 19
   end
20 20
 
21  
-  def test_serialized_init_with
22  
-    topic = Topic.allocate
23  
-    topic.init_with('attributes' => { 'content' => '--- foo' })
24  
-    assert_equal 'foo', topic.content
25  
-  end
26  
-
27 21
   def test_serialize_should_be_reversible
28 22
     FORMATS.each do |format|
29 23
       @serialized = Contact.new.send("to_#{format}")
@@ -51,10 +45,4 @@ def test_serialize_should_allow_attribute_except_filtering
51 45
       assert_equal @contact_attributes[:awesome], contact.awesome, "For #{format}"
52 46
     end
53 47
   end
54  
-
55  
-  def test_serialized_attributes_are_class_level_settings
56  
-    topic = Topic.new
57  
-    assert_raise(NoMethodError) { topic.serialized_attributes = [] }
58  
-    assert_deprecated { topic.serialized_attributes }
59  
-  end
60 48
 end

0 notes on commit 258461e

Please sign in to comment.
Something went wrong with that request. Please try again.