summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2016-08-22 14:51:27 -0700
committerTim Smith <tsmith@chef.io>2016-08-22 14:51:27 -0700
commit3fee839fd02fe061fbd840ba970ee7c826636c02 (patch)
tree4679323afad70298cf6d52ae5f18762ebfdea3d0 /spec
parent2ff0466762a73f9dd8fa4c92bf5a2e35065f4bad (diff)
downloadmixlib-shellout-3fee839fd02fe061fbd840ba970ee7c826636c02.tar.gz
Require Ruby 2.1+deprecate
Just removes some 1.9 logic from testing. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/shellout_spec.rb6
-rw-r--r--spec/support/platform_helpers.rb9
2 files changed, 1 insertions, 14 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index 7e93054..38915f3 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -17,10 +17,7 @@ describe Mixlib::ShellOut do
let(:ruby_code) { raise 'define let(:ruby_code)' }
let(:options) { nil }
- # On some testing environments, we have gems that creates a deprecation notice sent
- # out on STDERR. To fix that, we disable gems on Ruby 1.9.2
- let(:ruby_eval) { lambda { |code| "ruby #{disable_gems} -e '#{code}'" } }
- let(:disable_gems) { ( ruby_19? ? '--disable-gems' : '') }
+ let(:ruby_eval) { lambda { |code| "ruby -e '#{code}'" } }
context 'when instantiating' do
subject { shell_cmd }
@@ -1144,7 +1141,6 @@ describe Mixlib::ShellOut do
context 'on unix', :unix_only do
def ruby_wo_shell(code)
parts = %w[ruby]
- parts << "--disable-gems" if ruby_19?
parts << "-e"
parts << code
end
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index c730b4d..bbf7d15 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -1,12 +1,3 @@
-
-def ruby_19?
- !!(RUBY_VERSION =~ /^1.9/)
-end
-
-def ruby_18?
- !!(RUBY_VERSION =~ /^1.8/)
-end
-
def windows?
!!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end