Sha256: 7f560c1583e0c3847ca5512a27d8028925d9e047faac7581cc1aecc3ba8e57c2

Contents?: true

Size: 505 Bytes

Versions: 43

Compression:

Stored size: 505 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

43 entries across 43 versions & 3 rubygems

Version Path
aruba-0.14.14 spec/aruba/hooks_spec.rb
aruba-0.14.13 spec/aruba/hooks_spec.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/aruba-0.14.12/spec/aruba/hooks_spec.rb
aruba-0.14.12 spec/aruba/hooks_spec.rb
aruba-0.14.11 spec/aruba/hooks_spec.rb
aruba-0.14.10 spec/aruba/hooks_spec.rb
aruba-0.14.9 spec/aruba/hooks_spec.rb
aruba-0.14.8 spec/aruba/hooks_spec.rb
aruba-0.14.7 spec/aruba/hooks_spec.rb
aruba-0.14.6 spec/aruba/hooks_spec.rb
aruba-0.14.5 spec/aruba/hooks_spec.rb
aruba-0.14.4 spec/aruba/hooks_spec.rb
aruba-0.14.3 spec/aruba/hooks_spec.rb
aruba-win-fix-0.14.2 spec/aruba/hooks_spec.rb
aruba-0.14.2 spec/aruba/hooks_spec.rb
aruba-0.14.1 spec/aruba/hooks_spec.rb
aruba-0.14.0 spec/aruba/hooks_spec.rb
aruba-0.13.0 spec/aruba/hooks_spec.rb
aruba-0.12.0 spec/aruba/hooks_spec.rb
aruba-0.11.2 spec/aruba/hooks_spec.rb