summaryrefslogtreecommitdiff
path: root/spec/anonymous_command_specs.rb
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-02-16 23:32:42 -0700
committermo k <mo@mokhan.ca>2012-02-16 23:32:42 -0700
commit272c52e0402378d209e96af29a6edce963d8868c (patch)
treeb68ef4a6c276ec3cfc19e4a1ae79ac191d8e139f /spec/anonymous_command_specs.rb
parentfaa9af85891ceee8ea87e01b5b4412d6aa6cbc55 (diff)
create anonymous command.
Diffstat (limited to 'spec/anonymous_command_specs.rb')
-rw-r--r--spec/anonymous_command_specs.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/anonymous_command_specs.rb b/spec/anonymous_command_specs.rb
new file mode 100644
index 0000000..2616770
--- /dev/null
+++ b/spec/anonymous_command_specs.rb
@@ -0,0 +1,16 @@
+require "anonymous_command"
+
+describe AnonymousCommand do
+ describe "when run" do
+ it "should run the block" do
+ assert_equal true, @called
+ end
+ before(:each) do
+ #block = lambda { @called = true }
+ block = Proc.new { @called = true }
+ @called = false
+ @sut = AnonymousCommand.new(block)
+ @sut.run
+ end
+ end
+end