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

Version Path
odania-0.0.32 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.31 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.30 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.29 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.28 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.27 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.26 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.25 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.24 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.23 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.22 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.21 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.20 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.19 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.18 spec/lib/odania/config/plugin_config_spec.rb
odania-0.0.17 spec/lib/odania/config/plugin_config_spec.rb