summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-03-21 22:57:40 -0600
committermo khan <mo@mokhan.ca>2014-03-21 22:57:40 -0600
commitf6b096a65c3f5588c82047099ee3922be7573eb2 (patch)
tree14af8f2e3e2f094c085d33308b23acb9f520c132 /spec
parente7a25c6b21a1ae5c714320b340617b2e263b4789 (diff)
chain infinite commands together.v0.0.1395464273main
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/command_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/command_spec.rb b/spec/unit/command_spec.rb
index a3eddf1..fc041d4 100644
--- a/spec/unit/command_spec.rb
+++ b/spec/unit/command_spec.rb
@@ -20,12 +20,13 @@ module Nasty
context "without parameters" do
let(:first_command) { SimpleCommand.new }
let(:second_command) { SimpleCommand.new }
+ let(:third_command) { SimpleCommand.new }
- it "chains two commands together" do
- result = first_command.then(second_command)
- result.run
+ it "chains multiple commands together" do
+ first_command.then(second_command).then(third_command).run
first_command.ran?.should be_true
second_command.ran?.should be_true
+ third_command.ran?.should be_true
end
end