Skip to content

Commit

Permalink
Run redcarpet in redcarpet_bin_test with the interpreter the test sta…
Browse files Browse the repository at this point in the history
…rted with

This fixes test failure for Ruby 2.5 when Ruby 2.3 is the default installed
version.
  • Loading branch information
Balint Reczey committed Feb 19, 2018
1 parent 1c71f5e commit b14dbd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/redcarpet_bin_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def test_legacy_option_parsing

def run_bin(*args)
bin_path = File.expand_path('../../bin/redcarpet', __FILE__)
ruby = "ruby " if RUBY_PLATFORM =~ /mswin|mingw/
IO.popen("#{ruby}#{bin_path} #{args.join(" ")}") do |stream|
ruby = RbConfig.ruby
IO.popen("#{ruby} #{bin_path} #{args.join(" ")}") do |stream|
@output = stream.read
end
end
Expand Down

0 comments on commit b14dbd7

Please sign in to comment.