From 40cbfb95e31449f59886e73b8a0b3b2c12b4cb88 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 7 Feb 2014 09:24:09 -0800 Subject: [PATCH] core: fix Machine tests --- test/unit/vagrant/machine_test.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/unit/vagrant/machine_test.rb b/test/unit/vagrant/machine_test.rb index bcb3f8a0c..8e48dd511 100644 --- a/test/unit/vagrant/machine_test.rb +++ b/test/unit/vagrant/machine_test.rb @@ -41,7 +41,8 @@ describe Vagrant::Machine do # Returns a new instance with the test data def new_instance described_class.new(name, provider_name, provider_cls, provider_config, - provider_options, config, data_dir, box, env) + provider_options, config, data_dir, box, + env, env.vagrantfile) end describe "initialization" do @@ -77,7 +78,8 @@ describe Vagrant::Machine do # Initialize a new machine and verify that we properly receive # the machine we expect. instance = described_class.new(name, provider_name, provider_cls, provider_config, - provider_options, config, data_dir, box, env) + provider_options, config, data_dir, box, + env, env.vagrantfile) received_machine.should eql(instance) end @@ -110,6 +112,12 @@ describe Vagrant::Machine do end end + it "should have the vagrantfile" do + provider_init_test do |machine| + expect(machine.vagrantfile).to equal(env.vagrantfile) + end + end + it "should have access to the ID" do # Stub this because #id= calls it. provider.stub(:machine_id_changed)