243
231
it "should create as much childs as --parallel" do
244
232
@kick.options.stubs(:[]).with(:parallel).returns(3)
245
233
@kick.hosts = ['host1', 'host2', 'host3']
247
234
Process.stubs(:wait).returns(1).then.returns(2).then.returns(3).then.raises(Errno::ECHILD)
249
236
@kick.expects(:fork).times(3).returns(1).then.returns(2).then.returns(3)
254
241
it "should delegate to run_for_host per host" do
255
242
@kick.hosts = ['host1', 'host2']
257
243
@kick.stubs(:fork).returns(1).yields
258
244
Process.stubs(:wait).returns(1).then.raises(Errno::ECHILD)