Sha256: 0322d83486c2c70a738c7549d771734b37da739c935effc41f8317e2406b1aed

Contents?: true

Size: 506 Bytes

Versions: 6

Compression:

Stored size: 506 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
    expect(hook_was_run).to be_truthy
  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
    expect(hook_values).to eq [1,2,3]
  end

end

Version data entries

6 entries across 4 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/aruba-0.6.2/spec/aruba/hooks_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/aruba-0.6.1/spec/aruba/hooks_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/aruba-0.6.2/spec/aruba/hooks_spec.rb
aruba-0.6.2 spec/aruba/hooks_spec.rb
aruba-0.6.1 spec/aruba/hooks_spec.rb
aruba-0.6.0 spec/aruba/hooks_spec.rb