diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/test_unit/reporter.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/test_unit/reporter.rb b/railties/lib/rails/test_unit/reporter.rb index 7d3164f1eb..c8b7b70611 100644 --- a/railties/lib/rails/test_unit/reporter.rb +++ b/railties/lib/rails/test_unit/reporter.rb @@ -68,7 +68,12 @@ module Rails end def format_rerun_snippet(result) - location, line = result.method(result.name).source_location + location, line = if result.respond_to?(:source_location) + result.source_location + else + result.method(result.name).source_location + end + "#{executable} #{relative_path_for(location)}:#{line}" end |