test/vagrant/hosts/bsd_test.rb in vagrantup-0.5.4 vs test/vagrant/hosts/bsd_test.rb in vagrantup-0.6.0

- old
+ new

@@ -1,15 +1,12 @@ require "test_helper" class BSDHostTest < Test::Unit::TestCase setup do @klass = Vagrant::Hosts::BSD - @env = mock_environment - @env.stubs(:vm).returns(Vagrant::VM.new(:env => @env)) - @env.logger.stubs(:info) - - @instance = @klass.new(@env) + @env = vagrant_env + @instance = @klass.new(@env.vms.values.first.env) end context "supporting nfs check" do should "support NFS" do @instance.expects(:system).returns(true) @@ -38,10 +35,10 @@ end should "output the lines of the rendered template" do output = %W[foo bar baz].join("\n") Vagrant::Util::TemplateRenderer.expects(:render).with("nfs/exports", - :uuid => @env.vm.uuid, + :uuid => @instance.env.vm.uuid, :ip => @ip, :folders => @folders).returns(output) @instance.expects(:system).times(output.split("\n").length) @instance.expects(:system).with("sudo nfsd restart")