Sha256: 1c14caef86f9b4dd80c34902c376a651c4699425660bac36cbaa463dacd68271

Contents?: true

Size: 496 Bytes

Versions: 14

Compression:

Stored size: 496 Bytes

Contents

require 'aruba/config'

describe Aruba::Hooks do
  it 'executes a stored hook' do
    hook_was_run = false
    subject.append :hook_label, lambda { hook_was_run = true }
    subject.execute :hook_label, self
    hook_was_run.should be_true
  end

  it 'executes a stored hook that takes multiple arguments' do
    hook_values = []
    subject.append :hook_label, lambda { |a,b,c| hook_values = [a,b,c] }
    subject.execute :hook_label, self, 1, 2, 3
    hook_values.should == [1,2,3]
  end

end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
aruba-0.5.3 spec/aruba/hooks_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/aruba-0.5.1/spec/aruba/hooks_spec.rb
aruba-0.5.2 spec/aruba/hooks_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/aruba-0.5.1/spec/aruba/hooks_spec.rb
aruba-0.5.1 spec/aruba/hooks_spec.rb
aruba-0.5.0 spec/aruba/hooks_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/aruba-0.4.11/spec/aruba/hooks_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/aruba-0.4.11/spec/aruba/hooks_spec.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/aruba-0.4.11/spec/aruba/hooks_spec.rb
ftl-0.2.0 vendor/bundle/gems/aruba-0.4.11/spec/aruba/hooks_spec.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/aruba-0.4.11/spec/aruba/hooks_spec.rb
aruba-0.4.11 spec/aruba/hooks_spec.rb
aruba-0.4.10 spec/aruba/hooks_spec.rb
aruba-0.4.9 spec/aruba/hooks_spec.rb