Skip to content

Commit

Permalink
Refix db_config in spec_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpierce committed Jan 21, 2025
1 parent d3986e6 commit 89f3342
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def ci_build?
require 'factory_bot'

require File.expand_path("config/environment", ENV['RAILS_ROOT'])
db_config = ActiveRecord::Base.configurations[ENV['RAILS_ENV']][0]
db_config = ActiveRecord::Base.configurations.configs_for(env_name: ENV['RAILS_ENV'])[0]
ActiveRecord::Tasks::DatabaseTasks.create(db_config)
ActiveRecord::Migrator.migrations_paths = [Pathname.new(ENV['RAILS_ROOT']).join('db', 'migrate').to_s]
ActiveRecord::Tasks::DatabaseTasks.migrate
Expand Down

0 comments on commit 89f3342

Please sign in to comment.