spec/configurator_spec.rb in cliutils-2.2.1 vs spec/configurator_spec.rb in cliutils-2.2.2
- old
+ new
@@ -51,9 +51,15 @@
it 'allows data retrieval via a hash or magic methods' do
config.add_section(:test)
config.data[:test].merge!(name: 'Bob')
expect(config.data[:test][:name]).to eq('Bob')
expect(config.test[:name]).to eq('Bob')
+ expect(config.test.name).to eq('Bob')
+ end
+
+ it 'allows data setting via hash or magic methods' do
+ config.test.name = 'Aaron'
+ expect(config.data[:test][:name]).to eq('Aaron')
end
it 'resets the entire data collection' do
config.add_section(:test)
config.data[:test].merge!(name: 'Bob')