Sha256: 2bc83763968cc577ac0ffb1d39037789626a4c20a40c9601f6e4218ec2a0d28c
Contents?: true
Size: 749 Bytes
Versions: 16
Compression:
Stored size: 749 Bytes
Contents
describe Odania::Config::PluginConfig do let(:cfg) { JSON.parse File.read("#{BASE_DIR}/spec/fixtures/plugin_config_1.json") } context 'configuration' do it 'should be valid' do expect(subject.config).to be_a(Hash) expect(subject.domains).to be_a(Hash) subject.domains.each_pair do |domain, data| expect(data).to be_a(Odania::Config::Domain) end end it 'loads configuration' do expect(subject.load(cfg)).to be(true) expect(subject.config).to eql(cfg['config']) expect(subject.plugin_config).to eql(cfg['plugin-config']) expect(subject.domains.keys).to eql(cfg['domains'].keys) end it 'dumps the same config' do expect(subject.load(cfg)).to be(true) expect(subject.dump).to eql(cfg) end end end
Version data entries
16 entries across 16 versions & 1 rubygems