Sha256: 32f2caa493971239dfc705753ff28c3673070c8217725c68b4fda9b7cd43d567
Contents?: true
Size: 886 Bytes
Versions: 1
Compression:
Stored size: 886 Bytes
Contents
require 'rspec' require 'devinstall/settings' describe 'Settings' do config=Devinstall::Settings.instance config.load! "./doc/example.yml" it 'should load at init' do expect(config).to be_an_instance_of(Devinstall::Settings) [:defaults, :base, :local, :build, :install, :tests, :packages, :repos].each do |p| expect(config.send(p)).to be_true end # all sections loaded! end it 'should have defaults' do expect(config.defaults).to be_true end it 'should have a static default' do expect(Devinstall::Settings.defaults(:package)).to be(config.defaults(:package)) end it 'should raise errors for unknown keys' do expect{config.defaults :none}.to raise_error(Devinstall::UnknownKeyError) end it 'should raise errors for undefined keys' do expect{config.tests(:provider)}.to raise_error(Devinstall::KeyNotDefinedError) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devinstall-1.0.1 | spec/settings_spec.rb |