Additional unit test to verify missing config key behavior

This commit is contained in:
Mitchell Hashimoto 2013-02-08 16:55:06 -08:00
parent 595d6f7848
commit 1d1dfec940
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@ describe Vagrant::Config::V2::Root do
instance.__internal_state["missing_key_calls"].include?("foo").should be
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
instance = described_class.new({}, { :foo => "bar" })
instance.foo.should == "bar"