spec/env_spec.rb in anyway_config-1.1.0 vs spec/env_spec.rb in anyway_config-1.1.1

- old
+ new

@@ -31,6 +31,20 @@ expect(testo_config['data']['ids']).to include(1, 2, 3) expect(testo_config['data']['meta']['names']).to include('meta', 'kotleta') expect(testo_config['data']['meta']['size']).to eq 2 expect(testo_config['data']['text']).to eq "C'mon, everybody" end + + it "returns deep duped hash" do + ENV['TESTO_CONF'] = 'path/to/conf.yml' + ENV['TESTO_DATA__ID'] = '1' + ENV['TESTO_DATA__META__NAME'] = 'meta' + ENV['TESTO_DATA__META__VAL'] = 'true' + testo_config = env.fetch('testo') + testo_config.delete('conf') + testo_config['data']['meta'].delete('name') + + new_config = env.fetch('testo') + expect(new_config['data']['meta']['name']).to eq 'meta' + expect(new_config['conf']).to eq 'path/to/conf.yml' + end end