Skip to content

Commit 97bc74c

Browse files
committed
make sure new objects can round trip
1 parent 6d74710 commit 97bc74c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

activerecord/test/cases/yaml_serialization_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def test_psych_roundtrip
2828
assert_equal topic, t
2929
end
3030

31+
def test_psych_roundtrip_new_object
32+
topic = Topic.new
33+
assert topic
34+
t = Psych.load Psych.dump topic
35+
assert_equal topic.attributes, t.attributes
36+
end
3137
rescue LoadError
3238
end
3339
end

0 commit comments

Comments
 (0)