Upgrade to Rails 7.1 and apply new framework defaults
* Remove deprecated options from environments * Remove deprecation warnings for upcoming Rails 7.2 * Dump schema with new defaults * Remove outdated (and erroneous) data attribute in view * Resolve a `NoMethodError` for seeds_spec.rb
This commit is contained in:
@ -8,6 +8,11 @@ RSpec.describe 'seeds' do
|
||||
before do
|
||||
CodeOcean::Application.load_tasks
|
||||
|
||||
# We need to migrate the test database before seeding
|
||||
# Otherwise, Rails 7.1+ will throw an `NoMethodError`: `pending_migrations.any?`
|
||||
# See ActiveRecord gem, file `lib/active_record/railties/databases.rake`
|
||||
Rake::Task['db:migrate'].invoke
|
||||
|
||||
# We want to execute the seeds for the dev environment against the test database
|
||||
# rubocop:disable Rails/Inquiry
|
||||
allow(Rails).to receive(:env) { 'development'.inquiry }
|
||||
|
Reference in New Issue
Block a user