spec/lib/config_spec.rb in hieracles-0.1.2 vs spec/lib/config_spec.rb in hieracles-0.1.3
- old
+ new
@@ -59,11 +59,11 @@
let(:str) { 'bla=blu;one=two' }
let(:expected) { { bla: 'blu', one: 'two' } }
it { expect(Hieracles::Config.extract_params(str)).to eq expected }
end
- describe '.facts' do
+ describe '.scope' do
context 'with a yaml file' do
let(:options) do
{
config: 'spec/files/config.yml',
basepath: 'spec/files',
@@ -71,11 +71,11 @@
}
end
let(:expected) { 'Debian' }
before { Hieracles::Config.load options }
- it { expect(Hieracles::Config.facts['osfamily']).to eq expected }
+ it { expect(Hieracles::Config.scope[:osfamily]).to eq expected }
end
context 'with a json file' do
let(:options) do
{
config: 'spec/files/config.yml',
@@ -84,10 +84,10 @@
}
end
let(:expected) { 'Debian' }
before { Hieracles::Config.load options }
- it { expect(Hieracles::Config.facts['osfamily']).to eq expected }
+ it { expect(Hieracles::Config.scope[:osfamily]).to eq expected }
end
end
end