DEV: Check for pending migrations before running rspec suite
This should catch a few scenarios which can waste a lot of time in development - Forgetting to run migrations - Missing plugin migrations - Missing post_deploy migrations
This commit is contained in:
parent
c068804a0a
commit
f47909a2b6
|
@ -176,6 +176,12 @@ RSpec.configure do |config|
|
|||
config.infer_base_class_for_anonymous_controllers = true
|
||||
|
||||
config.before(:suite) do
|
||||
begin
|
||||
ActiveRecord::Migration.check_pending!
|
||||
rescue ActiveRecord::PendingMigrationError
|
||||
raise "There are pending migrations, run RAILS_ENV=test bin/rake db:migrate"
|
||||
end
|
||||
|
||||
Sidekiq.error_handlers.clear
|
||||
|
||||
# Ugly, but needed until we have a user creator
|
||||
|
|
Loading…
Reference in New Issue