Sha256: 082a2efca06d67292ce5034196cfcd412ff199d2315db1165cbae8d2bc2aa7f8
Contents?: true
Size: 852 Bytes
Versions: 11
Compression:
Stored size: 852 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 freeze' do config = Olelo::Config.new config['a'] = 42 config.freeze lambda do config['a'] += 1 end.should.raise RuntimeError end it 'should raise NameError' do lambda do Olelo::Config.new.not.existing end.should.raise NameError end end
Version data entries
11 entries across 11 versions & 1 rubygems