Sha256: f6862d29261edbc0fa6dcdfb0210d343393d5d5866b8ff4e72a71c5a09df33ce

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aruba-0.5.4 spec/aruba/hooks_spec.rb