diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-02 08:14:43 -0400 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-02 08:14:43 -0400 |
commit | 1a693c79c32cba070256fdb7bd1990c3d07d554f (patch) | |
tree | 75f5b6459c1cdc7510469f28be5f6a6c000fe046 /activerecord/test/cases/attribute_methods_test.rb | |
parent | 07723c23a7dc570beae73c074ad37227e3e8a06e (diff) | |
download | rails-1a693c79c32cba070256fdb7bd1990c3d07d554f.tar.gz rails-1a693c79c32cba070256fdb7bd1990c3d07d554f.tar.bz2 rails-1a693c79c32cba070256fdb7bd1990c3d07d554f.zip |
Fix test failures on MySQL
There were a few places where I missed a `create` vs `new`
before_type_cast check, and the semantics of `reload` became wrong.
Diffstat (limited to 'activerecord/test/cases/attribute_methods_test.rb')
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index 8e5723c8e5..9a0f0f8ada 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -177,7 +177,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase if current_adapter?(:MysqlAdapter, :Mysql2Adapter) def test_read_attributes_before_type_cast_on_boolean - bool = Boolean.create({ "value" => false }) + bool = Boolean.new({ "value" => false }) if RUBY_PLATFORM =~ /java/ # JRuby will return the value before typecast as string assert_equal "0", bool.reload.attributes_before_type_cast["value"] |