Sha256: 780e074fe7bcaa921e4cc0dd251bcc75b16a685c99a4076b84336dd91fcc5c13
Contents?: true
Size: 962 Bytes
Versions: 1
Compression:
Stored size: 962 Bytes
Contents
require 'spec_helper' describe KConfig do context "Simple Configuration" do before { KConfig.load!( { foo: 'bar' } ) } it { KSettings.get(:foo).should eql 'bar' } it { KSettings.foo.should eql 'bar' } end context "Custom Configuration" do it "should have the default settings constant as 'KSettings'" do KConfig.const_name.should eql "KSettings" end it "should be able to assign a different settings constant" do KConfig.setup { |config| config.const_name = "AnotherSettingConstantName" } KConfig.const_name.should == "AnotherSettingConstantName" end end context "KConfig::KWrapper" do let(:wrapper) { KConfig::KWrapper.new } before { wrapper.set(:key, 'value') } subject { wrapper.get(:key) } it "should have the value" do should eql 'value' end context "have method" do subject { wrapper } its(:key) { should eql 'value' } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
korben-0.0.3 | spec/korben/k_config_spec.rb |