Merge branch 'fix/gb/improve-active-record-test-extensions' into 'master'

Make `ActiveRecord::Migrator` idempotent again in test environment

Closes #33030

See merge request !11762
This commit is contained in:
Rémy Coutable 2017-05-30 14:02:47 +00:00
commit e8d4685d1f

View file

@ -10,7 +10,7 @@ if Rails.env.test?
# it reads + parses `db/migrate/*` each time. Memoizing it can save 0.5
# seconds per spec.
def migrations(paths)
@migrations ||= migrations_unmemoized(paths)
(@migrations ||= migrations_unmemoized(paths)).dup
end
end
end