aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_methods/serialization_test.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-28 08:24:59 -0700
committerSean Griffin <sean@thoughtbot.com>2014-05-29 12:12:44 -0700
commit2eb547a4d9cfb4ed1c92397921402048162f5fc8 (patch)
tree4deededa75b1e55f6bcb0c8156334c51aab560b3 /activerecord/test/cases/attribute_methods/serialization_test.rb
parent4a3f71b6fb07f5bbf9e43b259a7429c96752e00b (diff)
downloadrails-2eb547a4d9cfb4ed1c92397921402048162f5fc8.tar.gz
rails-2eb547a4d9cfb4ed1c92397921402048162f5fc8.tar.bz2
rails-2eb547a4d9cfb4ed1c92397921402048162f5fc8.zip
Refactor serialized types to be partially defined as custom properties
Many of the methods defined in `AttributeMethods::Serialization` can be refactored onto this type as well, but this is a reasonable small step. Removes the `Type` class, and the need for `decorate_columns` to handle serialized types.
Diffstat (limited to 'activerecord/test/cases/attribute_methods/serialization_test.rb')
-rw-r--r--activerecord/test/cases/attribute_methods/serialization_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/attribute_methods/serialization_test.rb b/activerecord/test/cases/attribute_methods/serialization_test.rb
index 75de773961..2e3bcadab1 100644
--- a/activerecord/test/cases/attribute_methods/serialization_test.rb
+++ b/activerecord/test/cases/attribute_methods/serialization_test.rb
@@ -14,13 +14,13 @@ module ActiveRecord
def test_type_cast_serialized_value
value = Serialization::Attribute.new(NullCoder.new, "Hello world", :serialized)
- type = Serialization::Type.new(FakeColumn.new)
+ type = Type::Serialized.new(FakeColumn.new)
assert_equal "Hello world!", type.type_cast(value)
end
def test_type_cast_unserialized_value
value = Serialization::Attribute.new(nil, "Hello world", :unserialized)
- type = Serialization::Type.new(FakeColumn.new)
+ type = Type::Serialized.new(FakeColumn.new)
type.type_cast(value)
assert_equal "Hello world", type.type_cast(value)
end