aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/schema_dumper_test.rb
diff options
context:
space:
mode:
authorRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2009-06-05 18:43:11 +0300
committerRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2009-08-06 23:41:00 +0300
commit9b2309c4a8a8c8ad46658c170ccfdb828b30c443 (patch)
tree82f044360d362806f6144385b487a2db4d147903 /activerecord/test/cases/schema_dumper_test.rb
parent94e761551b884604b01b43de3da2c873715e9b4b (diff)
downloadrails-9b2309c4a8a8c8ad46658c170ccfdb828b30c443.tar.gz
rails-9b2309c4a8a8c8ad46658c170ccfdb828b30c443.tar.bz2
rails-9b2309c4a8a8c8ad46658c170ccfdb828b30c443.zip
fix schema_dumper_test for Oracle as it supports precision up to 38
Diffstat (limited to 'activerecord/test/cases/schema_dumper_test.rb')
-rw-r--r--activerecord/test/cases/schema_dumper_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb
index bf9446a474..4f8e20b3ba 100644
--- a/activerecord/test/cases/schema_dumper_test.rb
+++ b/activerecord/test/cases/schema_dumper_test.rb
@@ -198,6 +198,11 @@ class SchemaDumperTest < ActiveRecord::TestCase
def test_schema_dump_keeps_large_precision_integer_columns_as_decimal
output = standard_dump
- assert_match %r{t.decimal\s+"atoms_in_universe",\s+:precision => 55,\s+:scale => 0}, output
+ # Oracle supports precision up to 38 and it identifies decimals with scale 0 as integers
+ if current_adapter?(:OracleAdapter)
+ assert_match %r{t.integer\s+"atoms_in_universe",\s+:precision => 38,\s+:scale => 0}, output
+ else
+ assert_match %r{t.decimal\s+"atoms_in_universe",\s+:precision => 55,\s+:scale => 0}, output
+ end
end
end