mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
make sure new objects can round trip
This commit is contained in:
parent
6d74710828
commit
97bc74c746
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,12 @@ class YamlSerializationTest < ActiveRecord::TestCase
|
|||
assert_equal topic, t
|
||||
end
|
||||
|
||||
def test_psych_roundtrip_new_object
|
||||
topic = Topic.new
|
||||
assert topic
|
||||
t = Psych.load Psych.dump topic
|
||||
assert_equal topic.attributes, t.attributes
|
||||
end
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue