diff options
author | yui-knk <spiketeika@gmail.com> | 2015-08-23 22:59:24 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2015-08-23 22:59:24 +0900 |
commit | 09969753195e988fff1546e5bdef940550f39e20 (patch) | |
tree | 12e94f7df2407ddce06afbd0ec968fc0bda618fc /activerecord/test | |
parent | 3cbaeb16013ef488a9619dd00dd00fe49bb6994d (diff) | |
download | rails-09969753195e988fff1546e5bdef940550f39e20.tar.gz rails-09969753195e988fff1546e5bdef940550f39e20.tar.bz2 rails-09969753195e988fff1546e5bdef940550f39e20.zip |
Remove test helper method to inside test method
Remove `MigrationTest#connection` and write `ActiveRecord::Base.connection`
directly to test, because `MigrationTest#connection` is only used in
`test_migration_instance_has_connection`.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index b2f209fe97..11e42f28dc 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -132,13 +132,9 @@ class MigrationTest < ActiveRecord::TestCase Person.connection.drop_table :testings2, if_exists: true end - def connection - ActiveRecord::Base.connection - end - def test_migration_instance_has_connection migration = Class.new(ActiveRecord::Migration).new - assert_equal connection, migration.connection + assert_equal ActiveRecord::Base.connection, migration.connection end def test_method_missing_delegates_to_connection |