spec/unit/settings/container_spec.rb in r10k-2.1.1 vs spec/unit/settings/container_spec.rb in r10k-2.2.0

- old
+ new

@@ -57,9 +57,16 @@ subject[:v] = 'child' parent[:v] = 'parent' expect(subject[:v]).to eq 'child' end + it 'duplicates and stores the parent object to avoid modifying the parent object' do + parent[:v] = {} + subject[:v][:hello] = "world" + expect(subject[:v]).to eq({hello: "world"}) + expect(parent[:v]).to eq({}) + end + it 'falls back to the parent value if it does not have a value' do parent[:v] = 'parent' expect(subject[:v]).to eq 'parent' end end