Class: Sus::Assertions::Error
- Inherits:
-
Object
- Object
- Sus::Assertions::Error
- Defined in:
- lib/sus/assertions.rb
Overview
Represents an error that occurred during test execution.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
Instance Method Summary collapse
- #each_failure {|_self| ... } ⇒ Object
-
#initialize(identity, error) ⇒ Error
constructor
Initialize a new error result.
- #message ⇒ Object
- #The exception that was raised.=(exceptionthatwasraised. = (value)) ⇒ Object
- #The identity where the error occurred.=(identitywheretheerroroccurred. = (value)) ⇒ Object
Constructor Details
#initialize(identity, error) ⇒ Error
Initialize a new error result.
312 313 314 315 |
# File 'lib/sus/assertions.rb', line 312 def initialize(identity, error) @identity = identity @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
321 322 323 |
# File 'lib/sus/assertions.rb', line 321 def error @error end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
318 319 320 |
# File 'lib/sus/assertions.rb', line 318 def identity @identity end |
Instance Method Details
#each_failure {|_self| ... } ⇒ Object
324 325 326 |
# File 'lib/sus/assertions.rb', line 324 def each_failure(&block) yield self end |
#message ⇒ Object
329 330 331 332 333 334 |
# File 'lib/sus/assertions.rb', line 329 def { text: @error., location: @identity&.to_location } end |
#The exception that was raised.=(exceptionthatwasraised. = (value)) ⇒ Object
321 |
# File 'lib/sus/assertions.rb', line 321 attr :error |
#The identity where the error occurred.=(identitywheretheerroroccurred. = (value)) ⇒ Object
318 |
# File 'lib/sus/assertions.rb', line 318 attr :identity |