providers/docker: vagrant_machine setting works proprely

This commit is contained in:
Mitchell Hashimoto 2014-05-05 21:13:15 -07:00
parent f475df0987
commit d7a9bcda47
2 changed files with 14 additions and 0 deletions

View File

@ -139,6 +139,9 @@ module VagrantPlugins
@vagrant_machine = nil if @vagrant_machine == UNSET_VALUE
@vagrant_vagrantfile = nil if @vagrant_vagrantfile == UNSET_VALUE
# The machine name must be a symbol
@vagrant_machine = @vagrant_machine.to_sym if @vagrant_machine
@expose.uniq!
end

View File

@ -202,6 +202,17 @@ describe VagrantPlugins::DockerProvider::Config do
end
end
describe "#vagrant_machine" do
before { valid_defaults }
it "should convert to a symbol" do
subject.vagrant_machine = "foo"
subject.finalize!
assert_valid
expect(subject.vagrant_machine).to eq(:foo)
end
end
describe "#vagrant_vagrantfile" do
before { valid_defaults }