Skip to content

Commit

Permalink
Fix failure description for multiple failure
Browse files Browse the repository at this point in the history
  • Loading branch information
TimAle authored and olleolleolle committed Apr 29, 2024
1 parent 3f79074 commit 1e24bf9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/rspec_junit_formatter/rspec3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ def failure_message_for(example)
end

def failure_for(notification)
strip_diff_colors(notification.message_lines.join("\n")) << "\n" << notification.formatted_backtrace.join("\n")
strip_diff_colors(formatted_lines_for(notification).join("\n"))
end

def formatted_lines_for(notification)
# drop(2) removes the description (regardless of newlines) and leading blank line
notification.fully_formatted_lines(nil, RSpec::Core::Notifications::NullColorizer).drop(2)
end

def exception_for(notification)
Expand Down

0 comments on commit 1e24bf9

Please sign in to comment.