1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix fragile tests

This commit is contained in:
Ryuta Kamizono 2019-04-04 04:48:16 +09:00
parent fe0145c580
commit 8be22161ed

View file

@ -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