Sha256: b27023315fb09bffa945872639ad7ffba4c5ac476ffc40f0cc08e2d7bad67a67

Contents?: true

Size: 670 Bytes

Versions: 24

Compression:

Stored size: 670 Bytes

Contents

require 'spec_helper'

RSpec.describe Aruba::InConfigWrapper do
  subject(:wrapper) { described_class.new(config) }

  let(:config) { {} }

  context 'when option is defined' do
    before :each do
      config[:opt] = true
    end

    context 'when valid' do
      it { expect(wrapper.opt).to be true }
    end

    context 'when one tries to pass arguments to option' do
      it { expect{ wrapper.opt('arg') }.to raise_error ArgumentError, 'Options take no argument' }
    end
  end

  context 'when option is not defined' do
    it { expect{ wrapper.opt }.to raise_error ArgumentError, 'Option "opt" is unknown. Please use only earlier defined options' }
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

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