Class: RSpec::Multicore::ReporterProxy
- Inherits:
-
Object
- Object
- RSpec::Multicore::ReporterProxy
show all
- Defined in:
- lib/rspec/multicore/reporter_bridge.rb
Overview
Exposes only the reporter calls made by RSpec 3.13 example execution.
Constant Summary
collapse
- GROUP_EVENTS =
%i[example_group_started example_group_finished].freeze
- EXAMPLE_EVENTS =
%i[example_started example_finished example_passed example_failed example_pending].freeze
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ReporterProxy.
156
157
158
159
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 156
def initialize(writer)
@writer = writer
@descriptions = {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
178
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 178
def method_missing(name, *) = raise UnsupportedReporterEvent, "Unsupported RSpec reporter event: #{name}"
|
Instance Method Details
#deprecation(*args) ⇒ Object
170
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 170
def deprecation(*args) = @writer.emit(:deprecation, args)
|
#fail_fast_limit_met? ⇒ Boolean
176
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 176
def fail_fast_limit_met? = false
|
#message(message) ⇒ Object
169
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 169
def message(message) = @writer.emit(:message, message.to_s)
|
#notify_non_example_exception(exception, context) ⇒ Object
172
173
174
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 172
def notify_non_example_exception(exception, context)
@writer.emit(:notify_non_example_exception, [Snapshot.failure(exception), context.to_s])
end
|
#respond_to_missing? ⇒ Boolean
180
|
# File 'lib/rspec/multicore/reporter_bridge.rb', line 180
def respond_to_missing?(*, **) = false
|