diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-05 14:03:13 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-05 14:03:13 -0800 |
commit | 97bc74c74611d3d71d58776ed907ebd0cdb98a15 (patch) | |
tree | 47dec0a1f36a8f919d865759c23a4b014805ed7e /activerecord/test/cases | |
parent | 6d747108286790bb7f5fa9ffbfcbdf4a557a2785 (diff) | |
download | rails-97bc74c74611d3d71d58776ed907ebd0cdb98a15.tar.gz rails-97bc74c74611d3d71d58776ed907ebd0cdb98a15.tar.bz2 rails-97bc74c74611d3d71d58776ed907ebd0cdb98a15.zip |
make sure new objects can round trip
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/yaml_serialization_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/yaml_serialization_test.rb b/activerecord/test/cases/yaml_serialization_test.rb index 7503b06126..abcf61ffc0 100644 --- a/activerecord/test/cases/yaml_serialization_test.rb +++ b/activerecord/test/cases/yaml_serialization_test.rb @@ -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 |