demarches-normaliennes/spec/lib/tasks/populate_zones_spec.rb
Christophe Robillard f9609b0b0b fix zone specs
by reenabling task before the next spec is run
2021-12-23 09:58:31 +01:00

14 lines
305 B
Ruby

describe 'populate_zones' do
let(:rake_task) { Rake::Task['zones:populate_zones'] }
subject(:run_task) do
rake_task.invoke
end
after(:each) do
rake_task.reenable
end
it 'populates zones' do
run_task
expect(Zone.find_by(acronym: 'PM').label).to eq "Premier ministre"
end
end