Class: RSpec::Signal::Symptom
- Inherits:
-
Struct
- Object
- Struct
- RSpec::Signal::Symptom
- Defined in:
- lib/rspec/signal/symptom.rb
Overview
One strong diagnostic characteristic pulled out of a failure message.
Symptoms are what the looser "related failures" layer clusters on, and they are deliberately narrow. Every extractor is anchored on a specific phrase produced by a specific library -- an HTTP status mismatch, a missing selector, a route that does not exist -- never on two messages merely resembling each other. A failure that matches nothing has no symptom and joins no cluster, which is the safe direction to be wrong in.
kind :http_status, :selector, ... -- which extractor fired
key the cluster identity; equal keys mean "same symptom"
label the cluster heading, already human-readable
detail this failure's own wording of the symptom, for the symptom list
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#key ⇒ Object
Returns the value of attribute key.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail
18 19 20 |
# File 'lib/rspec/signal/symptom.rb', line 18 def detail @detail end |
#key ⇒ Object
Returns the value of attribute key
18 19 20 |
# File 'lib/rspec/signal/symptom.rb', line 18 def key @key end |
#kind ⇒ Object
Returns the value of attribute kind
18 19 20 |
# File 'lib/rspec/signal/symptom.rb', line 18 def kind @kind end |
#label ⇒ Object
Returns the value of attribute label
18 19 20 |
# File 'lib/rspec/signal/symptom.rb', line 18 def label @label end |
Instance Method Details
#to_h ⇒ Object
19 20 21 |
# File 'lib/rspec/signal/symptom.rb', line 19 def to_h { kind: kind, key: key, label: label, detail: detail } end |