Make the windows test only run on windows for now until it can pass on unix

This commit is contained in:
Mitchell Hashimoto 2010-03-10 01:02:23 -08:00
parent b92efdfe53
commit 631580fc8e
2 changed files with 8 additions and 4 deletions

View File

@ -114,7 +114,7 @@ msg
end end
def load_root_path!(path=nil) def load_root_path!(path=nil)
path = Pathname.new(File.expand_path(path || Dir.pwd)) path = Pathname.new(File.expand_path(path || Dir.pwd))
# Stop if we're at the root. # Stop if we're at the root.
return false if path.root? return false if path.root?

View File

@ -246,9 +246,13 @@ class EnvTest < Test::Unit::TestCase
end end
should "return false if not found on windows-style root" do should "return false if not found on windows-style root" do
# Note the escaped back slash # TODO: Is there _any_ way to test this on unix machines? The
path = Pathname.new("C:\\") # expand path doesn't work [properly for the test] on unix machines.
assert !Vagrant::Env.load_root_path!(path) if RUBY_PLATFORM.downcase.include?("mswin")
# Note the escaped back slash
path = Pathname.new("C:\\")
assert !Vagrant::Env.load_root_path!(path)
end
end end
should "should set the path for the rootfile" do should "should set the path for the rootfile" do