Upgrade to Rails 6.0 and apply new framework defaults
This commit is contained in:
@ -7,12 +7,18 @@ describe 'seeds' do
|
||||
|
||||
before do
|
||||
CodeOcean::Application.load_tasks
|
||||
|
||||
# We want to execute the seeds for the dev environment against the test database
|
||||
allow(Rails).to receive(:env) { 'development'.inquiry }
|
||||
allow(ActiveRecord::Base).to receive(:establish_connection).and_call_original
|
||||
allow(ActiveRecord::Base).to receive(:establish_connection).with(:development) {
|
||||
ActiveRecord::Base.establish_connection(:test)
|
||||
}
|
||||
end
|
||||
|
||||
describe 'execute db:seed' do
|
||||
it 'collects the test results' do
|
||||
expect { seed }.not_to raise_error(StandardError)
|
||||
expect { seed }.not_to raise_error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user