Sha256: 8e4acdca019e948b0d2e119f5c098f96f45951c828ada1e522cd1365cc727815
Contents?: true
Size: 827 Bytes
Versions: 1
Compression:
Stored size: 827 Bytes
Contents
require 'spec_helper' describe A9n::Struct do subject { described_class.new({ :non_empty_dwarf => 'dwarf', :nil_dwarf => nil, :false_dwarf => false, :true_dwarf => true, :hash_dwarf => { :dwarf => 'hello' } }) } it 'gets non-empty value' do subject.non_empty_dwarf.should == 'dwarf' end it 'gets nil value' do subject.nil_dwarf.should == nil end it 'gets true value' do subject.true_dwarf.should == true end it 'gets false value' do subject.false_dwarf.should == false end it 'gets hash value' do subject.hash_dwarf.should be_kind_of(Hash) end it 'raises exception when value not exists' do expect { subject.non_existing_dwarf }.to raise_error(A9n::NoSuchConfigurationVariable) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
a9n-0.0.6 | spec/struct_spec.rb |