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

Commit 16841a3

Browse files
authored
Indent messages correctly in DocumentationFormatter.
When using `example.reporter.message`, it would be nice if the messages were indented correctly, so that it's clear it relates to the current spec being executed.
1 parent 77dbc84 commit 16841a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rspec/core/formatters/documentation_formatter.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def example_failed(failure)
3838
output.puts failure_output(failure.example)
3939
end
4040

41+
def message(notification)
42+
output.puts "#{current_indentation}#{notification.message}"
43+
end
44+
4145
private
4246

4347
def passed_output(example)

0 commit comments

Comments
 (0)