Module: RSpec::Core::Formatters

Defined in:
lib/rspec/core/formatters.rb,
lib/rspec/core/formatters/helpers.rb,
lib/rspec/core/formatters/protocol.rb,
lib/rspec/core/formatters/html_printer.rb,
lib/rspec/core/formatters/console_codes.rb,
lib/rspec/core/formatters/base_formatter.rb,
lib/rspec/core/formatters/html_formatter.rb,
lib/rspec/core/formatters/json_formatter.rb,
lib/rspec/core/formatters/profile_formatter.rb,
lib/rspec/core/formatters/snippet_extractor.rb,
lib/rspec/core/formatters/progress_formatter.rb,
lib/rspec/core/formatters/syntax_highlighter.rb,
lib/rspec/core/formatters/base_text_formatter.rb,
lib/rspec/core/formatters/exception_presenter.rb,
lib/rspec/core/formatters/bisect_drb_formatter.rb,
lib/rspec/core/formatters/base_bisect_formatter.rb,
lib/rspec/core/formatters/deprecation_formatter.rb,
lib/rspec/core/formatters/html_snippet_extractor.rb,
lib/rspec/core/formatters/documentation_formatter.rb,
lib/rspec/core/formatters/bisect_progress_formatter.rb,
lib/rspec/core/formatters/fallback_message_formatter.rb

Overview

See Also:

Defined Under Namespace

Modules: ConsoleCodes, Helpers Classes: BaseFormatter, BaseTextFormatter, FallbackMessageFormatter, HtmlSnippetExtractor, Loader, ProfileFormatter, Protocol

Class Method Summary collapse

Class Method Details

.register(formatter_class, *notifications) ⇒ void

Register the formatter class

Parameters:

  • formatter_class (Class)

    formatter class to register

  • notifications (Symbol, ...)

    one or more notifications to be registered to the specified formatter

See Also:

84
85
86
# File 'lib/rspec/core/formatters.rb', line 84
def self.register(formatter_class, *notifications)
  Loader.formatters[formatter_class] = notifications
end