Test base merge

This commit is contained in:
Mitchell Hashimoto 2012-01-11 21:31:19 -08:00
parent 1e856f7c75
commit 51353d51fc
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
require File.expand_path("../../../base", __FILE__)
describe Vagrant::Config::Base do
include_context "unit"
let(:foo_class) do
Class.new(described_class) do
attr_accessor :one
attr_accessor :two
end
end
it "should merge by default by simply copying each instance variable" do
one = foo_class.new
one.one = 2
one.two = 1
two = foo_class.new
two.two = 5
result = one.merge(two)
result.one.should == 2
result.two.should == 5
end
end