Additional unit test to verify missing config key behavior
This commit is contained in:
parent
595d6f7848
commit
1d1dfec940
|
@ -21,6 +21,11 @@ describe Vagrant::Config::V2::Root do
|
||||||
instance.__internal_state["missing_key_calls"].include?("foo").should be
|
instance.__internal_state["missing_key_calls"].include?("foo").should be
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "returns an OpenStruct for a missing key" do
|
||||||
|
instance = described_class.new({})
|
||||||
|
expect { instance.foo.foo = "bar" }.to_not raise_error
|
||||||
|
end
|
||||||
|
|
||||||
it "can be created with initial state" do
|
it "can be created with initial state" do
|
||||||
instance = described_class.new({}, { :foo => "bar" })
|
instance = described_class.new({}, { :foo => "bar" })
|
||||||
instance.foo.should == "bar"
|
instance.foo.should == "bar"
|
||||||
|
|
Loading…
Reference in New Issue