Sha256: aaac8f28c5f18ff078b97ca4bd1ade704bd21d5f7d6c46108923a40d38275c33
Contents?: true
Size: 680 Bytes
Versions: 5
Compression:
Stored size: 680 Bytes
Contents
require 'helper' describe 'Olelo::Config' do it 'should have #[]= and #[]' do config = Olelo::Config.new config['a.b.c'] = 42 config['a.b.c'].should.equal 42 config['a.b']['c'].should.equal 42 config['a']['b']['c'].should.equal 42 end it 'should be enumerable' do config = Olelo::Config.new config['a.x.y'] = 42 config['b.x.y'] = 43 config.each do |key, child| key.should.be.instance_of String child.should.be.instance_of Olelo::Config child['x.y'].should.be.instance_of Fixnum end end it 'should raise NameError' do lambda do Olelo::Config.new.not.existing end.should.raise NameError end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
olelo-0.9.4 | test/config_test.rb |
olelo-0.9.3 | test/config_test.rb |
olelo-0.9.2 | test/config_test.rb |
olelo-0.9.1 | test/config_test.rb |
olelo-0.9.0 | test/config_test.rb |