Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Move :nocov: to cover whole branch
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jul 13, 2024
1 parent e7ca6eb commit 41f06aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rspec/core/formatters/exception_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def failure_slash_error_lines
end

# rubocop:disable Lint/RescueException
# :nocov:
if SyntaxError.instance_methods.include?(:detailed_message)
def exception_message_string(exception)
case exception
Expand All @@ -191,14 +192,13 @@ def exception_message_string(exception)
"A #{exception.class} for which `exception.message.to_s` raises #{other.class}."
end
else
# :nocov:
def exception_message_string(exception)
exception.message.to_s
rescue Exception => other
"A #{exception.class} for which `exception.message.to_s` raises #{other.class}."
end
# :nocov:
end
# :nocov:
# rubocop:enable Lint/RescueException

def exception_lines
Expand Down

0 comments on commit 41f06aa

Please sign in to comment.