aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/defaults_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/defaults_test.rb b/activerecord/test/defaults_test.rb
index 965dd956b0..9701d1a8af 100644
--- a/activerecord/test/defaults_test.rb
+++ b/activerecord/test/defaults_test.rb
@@ -31,7 +31,8 @@ class DefaultTest < Test::Unit::TestCase
assert_equal 0, klass.columns_hash['zero'].default
assert !klass.columns_hash['zero'].null
- assert_equal nil, klass.columns_hash['omit'].default
+ # 0 in MySQL 4, nil in 5.
+ assert [0, nil].include?(klass.columns_hash['omit'].default)
assert !klass.columns_hash['omit'].null
assert_raise(ActiveRecord::StatementInvalid) { klass.create! }