diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-04 04:48:16 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-04 04:48:16 +0900 |
commit | 8be22161edd7608acd5cae436e4278bfe9f05abf (patch) | |
tree | 651e328990b491d2f23c00cb4ba01b440679e7a8 /activerecord | |
parent | fe0145c58008d286e53486d94ceeff74dc2407ef (diff) | |
download | rails-8be22161edd7608acd5cae436e4278bfe9f05abf.tar.gz rails-8be22161edd7608acd5cae436e4278bfe9f05abf.tar.bz2 rails-8be22161edd7608acd5cae436e4278bfe9f05abf.zip |
Fix fragile tests
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/tasks/database_tasks_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index 86f3e3bf23..4b27512fa1 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -50,6 +50,7 @@ module ActiveRecord protected_environments = ActiveRecord::Base.protected_environments current_env = ActiveRecord::Base.connection.migration_context.current_environment + InternalMetadata.create_table InternalMetadata[:environment] = current_env assert_called_on_instance_of( @@ -76,6 +77,7 @@ module ActiveRecord protected_environments = ActiveRecord::Base.protected_environments current_env = ActiveRecord::Base.connection.migration_context.current_environment + InternalMetadata.create_table InternalMetadata[:environment] = current_env assert_called_on_instance_of( @@ -958,9 +960,9 @@ module ActiveRecord def setup SchemaMigration.create_table - SchemaMigration.create!(version: "foo") + SchemaMigration.create!(version: SchemaMigration.table_name) InternalMetadata.create_table - InternalMetadata.create!(key: "foo", value: "bar") + InternalMetadata.create!(key: InternalMetadata.table_name) end def teardown |