mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:41:26 +08:00
DEV: Restore RSpec 'documentation' output, but collapse in CI (#26485)
This reverts commit ef895f1c32ad406a37a10137eab38d75bc82bd38 and 57df0d526e2d131d80c878edee27c8b3a0fccfe4, but adds GitHub actions line grouping to the verbose output to reduce scrolling.
This commit is contained in:
@ -3,7 +3,22 @@
|
||||
module TurboTests
|
||||
# An RSpec formatter that prepends the process id to all messages
|
||||
class DocumentationFormatter < ::TurboTests::BaseFormatter
|
||||
RSpec::Core::Formatters.register(self, :example_failed, :example_passed, :example_pending)
|
||||
RSpec::Core::Formatters.register(
|
||||
self,
|
||||
:example_failed,
|
||||
:example_passed,
|
||||
:example_pending,
|
||||
:start,
|
||||
:stop,
|
||||
)
|
||||
|
||||
def start(*args)
|
||||
output.puts "::group:: Verbose turbo_spec output" if ENV["GITHUB_ACTIONS"]
|
||||
end
|
||||
|
||||
def stop(*args)
|
||||
output.puts "::endgroup::" if ENV["GITHUB_ACTIONS"]
|
||||
end
|
||||
|
||||
def example_passed(notification)
|
||||
output.puts RSpec::Core::Formatters::ConsoleCodes.wrap(
|
||||
|
Reference in New Issue
Block a user