aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index 54c4d4ae90..660cc0057a 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -134,7 +134,11 @@ class AttributeMethodsTest < ActiveRecord::TestCase
if current_adapter?(:MysqlAdapter)
def test_read_attributes_before_type_cast_on_boolean
bool = Boolean.create({ "value" => false })
- assert_equal 0, bool.reload.attributes_before_type_cast["value"]
+ if RUBY_PLATFORM =~ /java/
+ assert_equal 0, bool.reload.attributes_before_type_cast["value"]
+ else
+ assert_equal "0", bool.reload.attributes_before_type_cast["value"]
+ end
end
end