diff options
author | Andre Arko <andre@arko.net> | 2014-03-31 17:58:57 +0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-03-31 17:58:57 +0800 |
commit | 5a37299c1db5181063b178874d9e91f73f97f8d0 (patch) | |
tree | a8987016db2f0ea926eb3ff2dcae507fa8ac8a35 /spec | |
parent | b98022843434b7d2482ce62f4fa7a2d2422b90c7 (diff) | |
download | bundler-5a37299c1db5181063b178874d9e91f73f97f8d0.tar.gz |
make the sudo test env more obvious
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 2 | ||||
-rw-r--r-- | spec/support/sudo.rb | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5deb1e7bc0..1a183ea5fc 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -45,7 +45,7 @@ RSpec.configure do |config| config.include Spec::Sudo config.include Spec::Permissions - if Spec::Sudo.test_sudo? + if ENV['BUNDLER_SUDO_TESTS'] && Spec::Sudo.present? config.filter_run :sudo => true else config.filter_run_excluding :sudo => true diff --git a/spec/support/sudo.rb b/spec/support/sudo.rb index 6c9a0c2d12..2192b09dc8 100644 --- a/spec/support/sudo.rb +++ b/spec/support/sudo.rb @@ -4,10 +4,6 @@ module Spec @which_sudo ||= Bundler.which("sudo") end - def self.test_sudo? - present? && ENV['BUNDLER_SUDO_TESTS'] - end - def sudo(cmd) raise "sudo not present" unless Sudo.present? sys_exec("sudo #{cmd}") |