Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 41f5c9654f7f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1a14aeae87e1
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 11, 2016

  1. Squashed 'spec/mspec/' changes from 88e734a..27b0077

    27b0077 Fix ruby_exe spec
    363e88f Always write the code to a file, unless escape is explicitly set to false
    
    git-subtree-dir: spec/mspec
    git-subtree-split: 27b007709893f05791944754f32af24ae74c920e
    eregon committed Aug 11, 2016
    Copy the full SHA
    e494b57 View commit details
  2. Copy the full SHA
    1a14aea View commit details
Showing with 3 additions and 3 deletions.
  1. +2 −2 spec/mspec/lib/mspec/helpers/ruby_exe.rb
  2. +1 −1 spec/mspec/spec/helpers/ruby_exe_spec.rb
4 changes: 2 additions & 2 deletions spec/mspec/lib/mspec/helpers/ruby_exe.rb
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ def ruby_exe(code, opts = {})
end

escape = opts.delete(:escape)
if escape
if code and not File.exist?(code) and escape != false
tmpfile = tmp("rubyexe.rb")
File.open(tmpfile, "w") { |f| f.write(code) }
code = tmpfile
@@ -144,7 +144,7 @@ def ruby_exe(code, opts = {})
key = key.to_s
ENV.delete key unless saved_env.key? key
end
File.delete tmpfile if escape
File.delete tmpfile if tmpfile
end
end
end
2 changes: 1 addition & 1 deletion spec/mspec/spec/helpers/ruby_exe_spec.rb
Original file line number Diff line number Diff line change
@@ -185,7 +185,7 @@ class RubyExeSpecs
it "executes (using `) the result of calling #ruby_cmd with the given arguments" do
code = "code"
options = {}
@script.should_receive(:ruby_cmd).with(code, options).and_return("ruby_cmd")
@script.should_receive(:ruby_cmd).and_return("ruby_cmd")
@script.should_receive(:`).with("ruby_cmd")
@script.ruby_exe(code, options)
end