diff options
Diffstat (limited to 'activerecord/test/defaults_test.rb')
-rw-r--r-- | activerecord/test/defaults_test.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/activerecord/test/defaults_test.rb b/activerecord/test/defaults_test.rb index f51f77cd71..aba3c66de4 100644 --- a/activerecord/test/defaults_test.rb +++ b/activerecord/test/defaults_test.rb @@ -1,18 +1,16 @@ require 'abstract_unit' require 'fixtures/default' -class DefaultsTest < Test::Unit::TestCase - if %w(PostgreSQL).include? ActiveRecord::Base.connection.adapter_name +if current_adapter?(:PostgreSQLAdapter, :SQLServerAdapter) + class DefaultsTest < Test::Unit::TestCase def test_default_integers default = Default.new - assert_instance_of(Fixnum, default.positive_integer) - assert_equal(default.positive_integer, 1) - assert_instance_of(Fixnum, default.negative_integer) - assert_equal(default.negative_integer, -1) - end - else - def test_dummy - assert true + assert_instance_of Fixnum, default.positive_integer + assert_equal 1, default.positive_integer + assert_instance_of Fixnum, default.negative_integer + assert_equal -1, default.negative_integer + assert_instance_of BigDecimal, default.decimal_number + assert_equal BigDecimal.new("2.78"), default.decimal_number end end end |