spec/invoker/commander_spec.rb in invoker-1.5.1 vs spec/invoker/commander_spec.rb in invoker-1.5.3

- old
+ new

@@ -25,11 +25,11 @@ end describe "#start_process" do describe "when not daemonized" do before do - processes = [OpenStruct.new(:label => "foobar", :cmd => "foobar_command", :dir => ENV['HOME'])] + processes = [OpenStruct.new(:label => "foobar", :cmd => "foobar_command", :dir => ENV['HOME'], :sleep_duration => 2)] Invoker.config.stubs(:processes).returns(processes) Invoker.config.stubs(:autorunnable_processes).returns(processes) Invoker.stubs(:can_run_balancer?).returns(false) @commander = Invoker::Commander.new Invoker.commander = @commander @@ -59,11 +59,11 @@ end end describe "when daemonized" do before do - processes = [OpenStruct.new(:label => "foobar", :cmd => "foobar_command", :dir => ENV['HOME'])] + processes = [OpenStruct.new(:label => "foobar", :cmd => "foobar_command", :dir => ENV['HOME'], :sleep_duration => 2)] Invoker.config.stubs(:processes).returns(processes) Invoker.config.stubs(:autorunnable_processes).returns(processes) Invoker.stubs(:can_run_balancer?).returns(false) @commander = Invoker::Commander.new Invoker.commander = @commander @@ -100,11 +100,11 @@ describe 'disable_autorun option' do context 'autorun is disabled for a process' do before do @processes = [ - OpenStruct.new(:label => "foobar", :cmd => "foobar_command", :dir => ENV['HOME']), - OpenStruct.new(:label => "panda", :cmd => "panda_command", :dir => ENV['HOME'], :disable_autorun => true) + OpenStruct.new(:label => "foobar", :cmd => "foobar_command", :dir => ENV['HOME'], :sleep_duration => 2), + OpenStruct.new(:label => "panda", :cmd => "panda_command", :dir => ENV['HOME'], :disable_autorun => true, :sleep_duration => 2) ] Invoker.config.stubs(:processes).returns(@processes) Invoker.config.stubs(:autorunnable_processes).returns([@processes.first]) @commander = Invoker::Commander.new