Skip to content

Commit

Permalink
RubyMine reporter provides file URL. Jump to test fixed
Browse files Browse the repository at this point in the history
RUBY-16613 minitest failure result nodes need "jump to test" functionality
  • Loading branch information
avokin committed Jul 4, 2016
1 parent 946094c commit ed1ae87
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/minitest/reporters/rubymine_reporter.rb
Expand Up @@ -88,8 +88,8 @@ def after_suite(suite)

def before_test(test)
super
fqn = "#{test.class.name}.#{test.name}"
log(@message_factory.create_test_started(test.name, minitest_test_location(fqn)))
location = test.class.instance_method(test.name).source_location
log(@message_factory.create_test_started(test.name, "file://#{location[0]}:#{location[1]}"))
end

#########
Expand All @@ -102,11 +102,6 @@ def log(msg)
msg
end

def minitest_test_location(fqn)
return nil if (fqn.nil?)
"ruby_minitest_qn://#{fqn}"
end

def with_result(test)
exception = test.failure
msg = exception.nil? ? "" : "#{exception.class.name}: #{exception.message}"
Expand Down

0 comments on commit ed1ae87

Please sign in to comment.