add namespace for populate_zones task
This commit is contained in:
parent
882f92268c
commit
822c754581
3 changed files with 11 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
namespace :zones do
|
||||||
task populate_zones: :environment do
|
task populate_zones: :environment do
|
||||||
puts "Running deploy task 'populate_zones'"
|
puts "Running deploy task 'populate_zones'"
|
||||||
|
|
||||||
|
@ -8,3 +9,4 @@ task populate_zones: :environment do
|
||||||
Zone.create!(acronym: acronym, label: ministere["label"])
|
Zone.create!(acronym: acronym, label: ministere["label"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
describe 'populate_zones' do
|
describe 'populate_zones' do
|
||||||
let(:rake_task) { Rake::Task['populate_zones'] }
|
let(:rake_task) { Rake::Task['zones:populate_zones'] }
|
||||||
subject(:run_task) do
|
subject(:run_task) do
|
||||||
rake_task.invoke
|
rake_task.invoke
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
describe UpdateZoneToProceduresService do
|
describe UpdateZoneToProceduresService do
|
||||||
before(:all) do
|
before(:all) do
|
||||||
Rake::Task['populate_zones'].invoke
|
Rake::Task['zones:populate_zones'].invoke
|
||||||
end
|
end
|
||||||
|
|
||||||
after(:all) do
|
after(:all) do
|
||||||
|
|
Loading…
Reference in a new issue