diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-01 01:15:16 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-01 01:15:16 +0000 |
commit | 52eedf5e2b0b39026ab5c63c5f28fe70f88ee8db (patch) | |
tree | 20c04be8cd8bd321dc4a2894b8906d97d2d3efc5 /activerecord/test | |
parent | 1c783c6040afd9a7ce0199e042e5c6549d0539b4 (diff) | |
download | rails-52eedf5e2b0b39026ab5c63c5f28fe70f88ee8db.tar.gz rails-52eedf5e2b0b39026ab5c63c5f28fe70f88ee8db.tar.bz2 rails-52eedf5e2b0b39026ab5c63c5f28fe70f88ee8db.zip |
Add hackery to make Syck use encode_with/init_with. Fixes 1.8 after recent changes to attribute serialization.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/yaml_serialization_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/yaml_serialization_test.rb b/activerecord/test/cases/yaml_serialization_test.rb index 0b54c309d1..5a38f2c6ee 100644 --- a/activerecord/test/cases/yaml_serialization_test.rb +++ b/activerecord/test/cases/yaml_serialization_test.rb @@ -18,6 +18,11 @@ class YamlSerializationTest < ActiveRecord::TestCase assert_equal topic, t end + def test_roundtrip_serialized_column + topic = Topic.new(:content => {:omg=>:lol}) + assert_equal({:omg=>:lol}, YAML.load(YAML.dump(topic)).content) + end + def test_encode_with_coder topic = Topic.first coder = {} |