diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-30 10:15:01 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-30 10:16:05 +0900 |
commit | 393d497a53973a45dda7a0d6384f9839ce17110a (patch) | |
tree | 098764687b105fcc3fbdfe724d24a159266e768b /activemodel | |
parent | 4734812ec595aa1a3951acc646d3b304fe7f0098 (diff) | |
download | rails-393d497a53973a45dda7a0d6384f9839ce17110a.tar.gz rails-393d497a53973a45dda7a0d6384f9839ce17110a.tar.bz2 rails-393d497a53973a45dda7a0d6384f9839ce17110a.zip |
Don't expose `attributes_with_uninitialized_key` utility method
It is not a test case.
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/attribute_set_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/activemodel/test/cases/attribute_set_test.rb b/activemodel/test/cases/attribute_set_test.rb index 9f7498fa65..9b323dae9d 100644 --- a/activemodel/test/cases/attribute_set_test.rb +++ b/activemodel/test/cases/attribute_set_test.rb @@ -209,11 +209,6 @@ module ActiveModel assert_equal "value from user", attributes.fetch_value(:foo) end - def attributes_with_uninitialized_key - builder = AttributeSet::Builder.new(foo: Type::Integer.new, bar: Type::Float.new) - builder.build_from_database(foo: "1.1") - end - test "freezing doesn't prevent the set from materializing" do builder = AttributeSet::Builder.new(foo: Type::String.new) attributes = builder.build_from_database(foo: "1") @@ -253,5 +248,11 @@ module ActiveModel assert_equal attributes, attributes2 assert_not_equal attributes2, attributes3 end + + private + def attributes_with_uninitialized_key + builder = AttributeSet::Builder.new(foo: Type::Integer.new, bar: Type::Float.new) + builder.build_from_database(foo: "1.1") + end end end |