summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-08-23 11:02:05 -0700
committerJohn Keiser <john@johnkeiser.com>2016-08-23 11:02:05 -0700
commit3253e1698fefaacf340829251550a894f66c7b60 (patch)
treee15c7adb85ea98393b667609afe956a4905913e6
parent44202823615dc28de4c9c4a34ae63eed047ac3b1 (diff)
downloadchef-jk/windows-test-warning.tar.gz
Get rid of "can't find win32 dll" warning in tests on non-Windows platformsjk/windows-test-warning
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/support/chef_helpers.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ba44f7c3f7..602badb03f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -150,7 +150,7 @@ RSpec.configure do |config|
config.filter_run_excluding :windows_domain_joined_only => true unless windows_domain_joined?
config.filter_run_excluding :windows_not_domain_joined_only => true if windows_domain_joined?
config.filter_run_excluding :solaris_only => true unless solaris?
- config.filter_run_excluding :system_windows_service_gem_only => true unless system_windows_service_gem?
+ config.filter_run_excluding :system_windows_service_gem_only => true unless windows? && system_windows_service_gem?
config.filter_run_excluding :unix_only => true unless unix?
config.filter_run_excluding :aix_only => true unless aix?
config.filter_run_excluding :debian_family_only => true unless debian_family?
diff --git a/spec/support/chef_helpers.rb b/spec/support/chef_helpers.rb
index d0b5ad0bfd..5df7bdcaf7 100644
--- a/spec/support/chef_helpers.rb
+++ b/spec/support/chef_helpers.rb
@@ -66,7 +66,7 @@ end
# win32/service gem. windows_service_manager tests create a windows
# service that starts with the system ruby and requires this gem.
def system_windows_service_gem?
- windows_service_gem_check_command = %q{ruby -r "win32/daemon" -e ":noop"}
+ windows_service_gem_check_command = %q{gem which win32/daemon}
if defined?(Bundler)
Bundler.with_clean_env do
# This returns true if the gem can be loaded