diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-06-22 08:48:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-22 08:48:37 -0400 |
commit | 55a443b847ccf37aa8fb62fbc827f5b540980dd9 (patch) | |
tree | c73412e57626394af985b1a0bc3983770d12df7e /guides | |
parent | 5de611afe63f9a30360d49db90e864d1d29dc283 (diff) | |
parent | 2dafc4be2285bc2cb32983be6f16296319b40e25 (diff) | |
download | rails-55a443b847ccf37aa8fb62fbc827f5b540980dd9.tar.gz rails-55a443b847ccf37aa8fb62fbc827f5b540980dd9.tar.bz2 rails-55a443b847ccf37aa8fb62fbc827f5b540980dd9.zip |
Merge pull request #29524 from y-yagi/do_not_use_private_api_in_bug_report_templates
Do not use private API in bug report templates
Diffstat (limited to 'guides')
-rw-r--r-- | guides/bug_report_templates/active_record_migrations_gem.rb | 6 | ||||
-rw-r--r-- | guides/bug_report_templates/active_record_migrations_master.rb | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/guides/bug_report_templates/active_record_migrations_gem.rb b/guides/bug_report_templates/active_record_migrations_gem.rb index 0c398e334a..00ba3c1cd6 100644 --- a/guides/bug_report_templates/active_record_migrations_gem.rb +++ b/guides/bug_report_templates/active_record_migrations_gem.rb @@ -48,16 +48,14 @@ end class BugTest < Minitest::Test def test_migration_up - migrator = ActiveRecord::Migrator.new(:up, [ChangeAmountToAddScale]) - migrator.run + ChangeAmountToAddScale.migrate(:up) Payment.reset_column_information assert_equal "decimal(10,2)", Payment.columns.last.sql_type end def test_migration_down - migrator = ActiveRecord::Migrator.new(:down, [ChangeAmountToAddScale]) - migrator.run + ChangeAmountToAddScale.migrate(:down) Payment.reset_column_information assert_equal "decimal(10,0)", Payment.columns.last.sql_type diff --git a/guides/bug_report_templates/active_record_migrations_master.rb b/guides/bug_report_templates/active_record_migrations_master.rb index 84a4b71909..52c9028b0f 100644 --- a/guides/bug_report_templates/active_record_migrations_master.rb +++ b/guides/bug_report_templates/active_record_migrations_master.rb @@ -48,16 +48,14 @@ end class BugTest < Minitest::Test def test_migration_up - migrator = ActiveRecord::Migrator.new(:up, [ChangeAmountToAddScale]) - migrator.run + ChangeAmountToAddScale.migrate(:up) Payment.reset_column_information assert_equal "decimal(10,2)", Payment.columns.last.sql_type end def test_migration_down - migrator = ActiveRecord::Migrator.new(:down, [ChangeAmountToAddScale]) - migrator.run + ChangeAmountToAddScale.migrate(:down) Payment.reset_column_information assert_equal "decimal(10,0)", Payment.columns.last.sql_type |