From b386e1dbbd4f75785536173ccaabd97308a0cf6c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 15 Jan 2014 10:54:50 -0800 Subject: [PATCH] test: allow skipping certain tests on Windows --- test/unit/base.rb | 6 ++++++ test/unit/vagrant/util/ssh_test.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/unit/base.rb b/test/unit/base.rb index 5e8303f6d..df57435ad 100644 --- a/test/unit/base.rb +++ b/test/unit/base.rb @@ -5,6 +5,7 @@ require "rspec/autorun" # Require Vagrant itself so we can reference the proper # classes to test. require "vagrant" +require "vagrant/util/platform" # Add the test directory to the load path $:.unshift File.expand_path("../../", __FILE__) @@ -25,6 +26,11 @@ $stderr.sync = true # Configure RSpec RSpec.configure do |c| c.expect_with :rspec, :stdlib + c.treat_symbols_as_metadata_keys_with_true_values = true + + if Vagrant::Util::Platform.windows? + c.filter_run_excluding :skip_windows + end end # Configure VAGRANT_CWD so that the tests never find an actual diff --git a/test/unit/vagrant/util/ssh_test.rb b/test/unit/vagrant/util/ssh_test.rb index 30bfe0d5e..76da0ea6d 100644 --- a/test/unit/vagrant/util/ssh_test.rb +++ b/test/unit/vagrant/util/ssh_test.rb @@ -20,7 +20,7 @@ describe Vagrant::Util::SSH do key_path.stat.mode.should == mode end - it "should fix the permissions" do + it "should fix the permissions", :skip_windows do key_path.chmod(0644) described_class.check_key_permissions(key_path)