Sha256: 9da3fb19173193d9c2a826a0cf4fef05f79a4d122a8e779d539a5e42929db12d
Contents?: true
Size: 668 Bytes
Versions: 14
Compression:
Stored size: 668 Bytes
Contents
require 'spec_helper' RSpec.describe Aruba::ConfigWrapper 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
14 entries across 14 versions & 1 rubygems