Files
grecia/spec/lib/tasks/dev_seed_spec.rb
Javi Martín 1a5b73a0bd Don't load tasks several times in specs
Calling `load_tasks` in several files made rails load the tasks several
times, and so they were executed several times when called.

Since the milestone migration can't be executed twice in a row (it would
fail with duplicated ID records), loading the tasks several times made
the milestone migrations task specs fail.
2018-11-30 14:15:21 +01:00

12 lines
247 B
Ruby

require 'rails_helper'
describe 'rake db:dev_seed' do
let :run_rake_task do
Rake.application.invoke_task('db:dev_seed[avoid_log]')
end
it 'seeds the database without errors' do
expect { run_rake_task }.not_to raise_error
end
end