mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
[SCI-3567] Add check_pending! call for test migrations (#1960)
[SCI-3567] Add check_pending! call for test migrations
This commit is contained in:
commit
dc48e8b339
1 changed files with 6 additions and 3 deletions
|
@ -29,9 +29,12 @@ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
|||
#
|
||||
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
||||
|
||||
# Checks for pending migration and applies them before tests are run.
|
||||
# If you are not using ActiveRecord, you can remove this line.
|
||||
ActiveRecord::Migration.maintain_test_schema!
|
||||
# Checks for pending migration
|
||||
begin
|
||||
ActiveRecord::Migration.check_pending!
|
||||
rescue ActiveRecord::PendingMigrationError => e
|
||||
abort(e.message)
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
||||
|
|
Loading…
Reference in a new issue