Sha256: 2143a3da411d17410d2e4ee1d61c8b5f6fbef1af32d89c2858a3b88659db1edd

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

require File.dirname(__FILE__) + "/test_helper.rb"

context "A HookWithArguments" do
  test "should pass the arguments to trigger_hooks() along to each registered block" do
    hook_manager = Adhearsion::Hooks::HookWithArguments.new
    hook_manager.create_hook do |foo, bar|
      foo.should.equal :foo
      bar.should.equal :bar
      throw :inside_hook
    end
    the_following_code {
      hook_manager.trigger_hooks(:foo, :bar)
    }.should.throw :inside_hook
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sevenscale-adhearsion-0.7.1003 spec/test_hooks.rb