From 7248797fa5814a37806901ad55ef4dcfbde20456 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 15 Jan 2014 11:32:53 -0800 Subject: [PATCH] core: add test for fs_real_path on Windows --- test/unit/base.rb | 2 ++ test/unit/vagrant/util/platform_test.rb | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/unit/vagrant/util/platform_test.rb diff --git a/test/unit/base.rb b/test/unit/base.rb index df57435ad..6866f0f36 100644 --- a/test/unit/base.rb +++ b/test/unit/base.rb @@ -30,6 +30,8 @@ RSpec.configure do |c| if Vagrant::Util::Platform.windows? c.filter_run_excluding :skip_windows + else + c.filter_run_excluding :windows end end diff --git a/test/unit/vagrant/util/platform_test.rb b/test/unit/vagrant/util/platform_test.rb new file mode 100644 index 000000000..3e980937f --- /dev/null +++ b/test/unit/vagrant/util/platform_test.rb @@ -0,0 +1,13 @@ +require File.expand_path("../../../base", __FILE__) + +require "vagrant/util/platform" + +describe Vagrant::Util::Platform do + subject { described_class } + + describe "#fs_real_path" do + it "fixes drive letters on Windows", :windows do + expect(described_class.fs_real_path("c:/foo").to_s).to eql("C:/foo") + end + end +end