spec/invoker/commander_spec.rb in invoker-0.1.2 vs spec/invoker/commander_spec.rb in invoker-1.0.0
- old
+ new
@@ -21,10 +21,11 @@
@commander = Invoker::Commander.new()
end
it "should find command by label and start it, if found" do
invoker_config.stubs(:processes).returns([OpenStruct.new(:label => "resque", :cmd => "foo", :dir => "bar")])
+ invoker_config.expects(:process).returns(OpenStruct.new(:label => "resque", :cmd => "foo", :dir => "bar"))
@commander.expects(:add_command).returns(true)
@commander.add_command_by_label("resque")
end
end
@@ -95,11 +96,10 @@
worker = @commander.workers['sleep']
worker.should.not.equal nil
worker.command_label.should.equal "sleep"
- worker.color.should.equal "green"
-
+ worker.color.should.equal :green
pipe_end_worker = @commander.open_pipes[worker.pipe_end.fileno]
pipe_end_worker.should.not.equal nil
end
end