From 86fbf9f55b07f150acbb0116413dc1f4b910694e Mon Sep 17 00:00:00 2001 From: Kai Wood Date: Fri, 6 Nov 2015 11:32:25 +0100 Subject: [PATCH] Add standalone Minitest support to test runner Before this change, the test runner didn't detect minitest/autorun, the standard test framework nowadays. This adds working colorization and clickable file links. --- Support/RubyMate/run_script.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Support/RubyMate/run_script.rb b/Support/RubyMate/run_script.rb index 0176e29..9a4548f 100755 --- a/Support/RubyMate/run_script.rb +++ b/Support/RubyMate/run_script.rb @@ -41,7 +41,7 @@ end is_test_script = !(ENV["TM_FILEPATH"].match(/(?:\b|_)(?:tc|ts|test)(?:\b|_)/).nil? and - File.read(ENV["TM_FILEPATH"]).match(/\brequire\b.+(?:test\/unit|test_helper)/).nil?) + File.read(ENV["TM_FILEPATH"]).match(/\brequire\b.+(?:test\/unit|test_helper|minitest)/).nil?) cmd = [ENV['TM_RUBY'] || 'ruby', '-rcatch_exception'] @@ -132,8 +132,8 @@ def actual_path_name(path) elsif line =~ /([\w\_]+).*\[([\w\_\/\.]+)\:(\d+)\]/ # whatever_message....[function_name/.whatever:line_no] method, file, line = $1, $2, $3 "#{method}:#{line}
" - elsif line =~ /^\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors\b.*/ - "
#{$&}
\n" + elsif line =~ /^\d+ (tests|runs), \d+ assertions, (\d+) failures, (\d+) errors\b.*/ + "
#{$&}
\n" end end end