summaryrefslogtreecommitdiff
path: root/spec/anonymous_command_specs.rb
blob: 26167703650e7cd4967d892aa3950dddb3a3c8d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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