diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index e4ac5c6..fb7c062 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -18,7 +18,7 @@ let(:ruby_code) { raise "define let(:ruby_code)" } let(:options) { nil } - let(:ruby_eval) { lambda { |code| "ruby -e '#{code}'" } } + let(:ruby_eval) { lambda { |code| "#{Gem.ruby} -e '#{code}'" } } context "when instantiating" do subject { shell_cmd } @@ -1177,7 +1177,7 @@ def shell_out_cmd context "on unix", :unix_only do def ruby_wo_shell(code) - parts = %w{ruby} + parts = [ Gem.ruby ] parts << "-e" parts << code end