Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/tasks/check_for_pending_migrations.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace :db do
)
warn('Skipping pending migration check, idp_run_migrations=true')
else
ActiveRecord::Migration.check_all_pending!(ActiveRecord::Base.connection)
ActiveRecord::Migration.check_all_pending!
end
end
end
15 changes: 15 additions & 0 deletions spec/lib/tasks/check_for_pending_migrations_rake_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'rails_helper'
require 'rake'

RSpec.describe 'check for pending migrations rake tasks' do
before do
Rake.application.rake_require 'tasks/check_for_pending_migrations'
Rake::Task.define_task(:environment)
end

describe 'db:check_for_pending_migrations' do
it 'runs successfully' do
Rake::Task['db:check_for_pending_migrations'].invoke
end
end
end