diff options
author | John Gesimondo <john@jmondo.com> | 2015-06-11 13:31:01 -0700 |
---|---|---|
committer | John Gesimondo <john@jmondo.com> | 2015-06-23 14:38:00 -0700 |
commit | 4f58c501cf9355258fe16b2526ac01586ff71b08 (patch) | |
tree | 79370cdaa16652def1a003c18896422605fa84d8 /activerecord/test/cases/schema_dumper_test.rb | |
parent | 1022796ac075a5f1a3ca45f4d48284d4bfa2567a (diff) | |
download | rails-4f58c501cf9355258fe16b2526ac01586ff71b08.tar.gz rails-4f58c501cf9355258fe16b2526ac01586ff71b08.tar.bz2 rails-4f58c501cf9355258fe16b2526ac01586ff71b08.zip |
Display decimal defaults as strings to keep precision
Diffstat (limited to 'activerecord/test/cases/schema_dumper_test.rb')
-rw-r--r-- | activerecord/test/cases/schema_dumper_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb index 51170c533b..feb1c29656 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -239,7 +239,7 @@ class SchemaDumperTest < ActiveRecord::TestCase def test_schema_dump_includes_decimal_options output = dump_all_table_schema([/^[^n]/]) - assert_match %r{precision: 3,[[:space:]]+scale: 2,[[:space:]]+default: 2\.78}, output + assert_match %r{precision: 3,[[:space:]]+scale: 2,[[:space:]]+default: "2\.78"}, output end if current_adapter?(:PostgreSQLAdapter) @@ -255,7 +255,7 @@ class SchemaDumperTest < ActiveRecord::TestCase def test_schema_dump_allows_array_of_decimal_defaults output = standard_dump - assert_match %r{t\.decimal\s+"decimal_array_default",\s+default: \[1.23, 3.45\],\s+array: true}, output + assert_match %r{t\.decimal\s+"decimal_array_default",\s+default: \["1.23", "3.45"\],\s+array: true}, output end if ActiveRecord::Base.connection.supports_extensions? |