diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-03-05 20:28:03 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-03-05 20:28:03 +0900 |
commit | 60440a68b13a5408cd9c492cc2eaed2e68f95bd7 (patch) | |
tree | c12f4de2ef8543e0c4beda06fc4f74f6f016b7d3 /activerecord/test | |
parent | 12038f6505cdbcdbea861c7ae5f272e918100e13 (diff) | |
download | rails-60440a68b13a5408cd9c492cc2eaed2e68f95bd7.tar.gz rails-60440a68b13a5408cd9c492cc2eaed2e68f95bd7.tar.bz2 rails-60440a68b13a5408cd9c492cc2eaed2e68f95bd7.zip |
Remove useless `Migrator.schema_migrations_table_name`
Simply use `SchemaMigration.table_name` instead.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index fabb1662a3..744fa865be 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -337,20 +337,20 @@ class MigrationTest < ActiveRecord::TestCase end def test_schema_migrations_table_name - original_schema_migrations_table_name = ActiveRecord::Migrator.schema_migrations_table_name + original_schema_migrations_table_name = ActiveRecord::Base.schema_migrations_table_name - assert_equal "schema_migrations", ActiveRecord::Migrator.schema_migrations_table_name + assert_equal "schema_migrations", ActiveRecord::SchemaMigration.table_name ActiveRecord::Base.table_name_prefix = "prefix_" ActiveRecord::Base.table_name_suffix = "_suffix" Reminder.reset_table_name - assert_equal "prefix_schema_migrations_suffix", ActiveRecord::Migrator.schema_migrations_table_name + assert_equal "prefix_schema_migrations_suffix", ActiveRecord::SchemaMigration.table_name ActiveRecord::Base.schema_migrations_table_name = "changed" Reminder.reset_table_name - assert_equal "prefix_changed_suffix", ActiveRecord::Migrator.schema_migrations_table_name + assert_equal "prefix_changed_suffix", ActiveRecord::SchemaMigration.table_name ActiveRecord::Base.table_name_prefix = "" ActiveRecord::Base.table_name_suffix = "" Reminder.reset_table_name - assert_equal "changed", ActiveRecord::Migrator.schema_migrations_table_name + assert_equal "changed", ActiveRecord::SchemaMigration.table_name ensure ActiveRecord::Base.schema_migrations_table_name = original_schema_migrations_table_name Reminder.reset_table_name |