diff options
| author | mo k <mo@mokhan.ca> | 2012-02-16 23:09:19 -0700 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-02-16 23:09:19 -0700 |
| commit | faa9af85891ceee8ea87e01b5b4412d6aa6cbc55 (patch) | |
| tree | d5f23302f3c022657d5b0dcf900cadf4568eca39 /spec/command_processor_specs.rb | |
| parent | 23c3c07dcf93c07cfc536cfd5d26933ae2d4b7a8 (diff) | |
create command processor.
Diffstat (limited to 'spec/command_processor_specs.rb')
| -rw-r--r-- | spec/command_processor_specs.rb | 20 |
1 files changed, 20 insertions, 0 deletions
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 |
