spec/figgy_spec.rb in figgy-1.1.0 vs spec/figgy_spec.rb in figgy-1.2.0
- old
+ new
@@ -186,9 +186,14 @@
it "returns nil when explicitly set to that value in the YAML file" do
write_config 'reason_to_do_this', nil.to_yaml
expect(test_config.reason_to_do_this).to eq(nil)
end
+
+ it "prioritizes hash methods over keys in the YAML file" do
+ write_config 'bad', { 'default' => 'something'}.to_yaml
+ expect(test_config.bad.default).to eq(nil)
+ end
end
context "multiple roots" do
it "can be told to read from multiple directories" do
write_config 'root1/values', 'foo: 1'