Class: RuboCop::RSpec::ParallelFormatter
- Inherits:
-
RSpec::Core::Formatters::BaseTextFormatter
- Object
- RSpec::Core::Formatters::BaseTextFormatter
- RuboCop::RSpec::ParallelFormatter
- Defined in:
- lib/rubocop/rspec/parallel_formatter.rb
Overview
RSpec formatter for use with running rake spec
in parallel. This formatter
removes much of the noise from RSpec so that only the important information
will be surfaced by test-queue.
It also adds metadata to the output in order to more easily find the text
needed for outputting after the parallel run completes.
Instance Method Summary collapse
-
#dump_failures(notification) ⇒ Object
The BEGIN/END comments are used by
spec_runner.rake
to determine what output goes where in the final parallelized output, and should not be removed!. -
#dump_pending ⇒ Object
Don’t show pending tests.
- #dump_summary(summary) ⇒ Object
Instance Method Details
#dump_failures(notification) ⇒ Object
The BEGIN/END comments are used by spec_runner.rake
to determine what
output goes where in the final parallelized output, and should not be
removed!
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rubocop/rspec/parallel_formatter.rb', line 22 def dump_failures(notification) return if notification.failure_notifications.empty? output.puts '# FAILURES BEGIN' notification.failure_notifications.each do |failure| output.puts failure.fully_formatted('*', colorizer) end output.puts output.puts '# FAILURES END' end |
#dump_pending ⇒ Object
Don’t show pending tests
17 |
# File 'lib/rubocop/rspec/parallel_formatter.rb', line 17 def dump_pending(*); end |
#dump_summary(summary) ⇒ Object
33 34 35 36 |
# File 'lib/rubocop/rspec/parallel_formatter.rb', line 33 def dump_summary(summary) output_summary(summary) output_rerun_commands(summary) end |