From faa9af85891ceee8ea87e01b5b4412d6aa6cbc55 Mon Sep 17 00:00:00 2001 From: mo k Date: Thu, 16 Feb 2012 23:09:19 -0700 Subject: create command processor. --- spec/command_processor_specs.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/command_processor_specs.rb (limited to 'spec/command_processor_specs.rb') diff --git a/spec/command_processor_specs.rb b/spec/command_processor_specs.rb new file mode 100644 index 0000000..22c4099 --- /dev/null +++ b/spec/command_processor_specs.rb @@ -0,0 +1,20 @@ +require "command_processor" + +describe CommandProcessorSpecs do + before(:each) do + @sut = CommandProcessor.new + end + describe "when run" do + it "should run each command added to the queue" do + @first_command.received(:run).wont_be_nil + @second_command.received(:run).wont_be_nil + end + before do + @first_command = fake + @second_command = fake + @sut.add(@first_command) + @sut.add(@second_command) + @sut.run + end + end +end -- cgit v1.2.3