summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/shellout_spec.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index 71ecfef..5e92a54 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -825,9 +825,16 @@ describe Mixlib::ShellOut do
end
end
- context 'with subprocess that takes longer than timeout' do
+ context 'with subprocess that takes longer than timeout', :focus do
+ def ruby_wo_shell(code)
+ parts = %w[ruby]
+ parts << "--disable-gems" if ruby_19?
+ parts << "-e"
+ parts << code
+ end
+
let(:cmd) do
- ruby_eval.call(<<-CODE)
+ ruby_wo_shell(<<-CODE)
STDOUT.sync = true
trap(:TERM) { puts "got term"; exit!(123) }
sleep 10
@@ -849,7 +856,7 @@ describe Mixlib::ShellOut do
context "and the child is unresponsive" do
let(:cmd) do
- ruby_eval.call(<<-CODE)
+ ruby_wo_shell(<<-CODE)
STDOUT.sync = true
trap(:TERM) { puts "nanana cant hear you" }
sleep 10