diff --git a/test/unit/vagrant/util/file_util_test.rb b/test/unit/vagrant/util/which_test.rb similarity index 79% rename from test/unit/vagrant/util/file_util_test.rb rename to test/unit/vagrant/util/which_test.rb index 61d7897af..759f8f8a6 100644 --- a/test/unit/vagrant/util/file_util_test.rb +++ b/test/unit/vagrant/util/which_test.rb @@ -1,10 +1,9 @@ require File.expand_path("../../../base", __FILE__) -require 'vagrant/util/file_util' require 'vagrant/util/platform' +require 'vagrant/util/which' -describe Vagrant::Util::FileUtil do - +describe Vagrant::Util::Which do def tester (file_extension, test_extension, mode, &block) # create file in temp directory filename = '__vagrant_unit_test__' @@ -24,23 +23,21 @@ describe Vagrant::Util::FileUtil do it "should return a path for an executable file" do tester '.bat', '.bat', 0755 do |name| - Vagrant::Util::FileUtil.which(name).should_not be_nil + described_class.which(name).should_not be_nil end end if Vagrant::Util::Platform.windows? it "should return a path for a Windows executable file" do tester '.bat', '', 0755 do |name| - Vagrant::Util::FileUtil.which(name).should_not be_nil + described_class.which(name).should_not be_nil end end end it "should return nil for a non-executable file" do tester '.txt', '.txt', 0644 do |name| - Vagrant::Util::FileUtil.which(name).should be_nil + described_class.which(name).should be_nil end end - end -