SusSourceSusAssertionsError

class Error

Represents an error that occurred during test execution.

Definitions

def initialize(identity, error)

Initialize a new error result.

Signature

parameter identity Identity, nil

The identity where the error occurred.

parameter error Exception

The exception that was raised.

Implementation

def initialize(identity, error)
	@identity = identity
	@error = error
end

attr :identity

Signature

attribute Identity, nil

The identity where the error occurred.

attr :error

Signature

attribute Exception

The exception that was raised.

def each_failure(&block)

Signature

yields {|error| ...}

Yields this error as a failure.

Implementation

def each_failure(&block)
	yield self
end

def message

Signature

returns Hash

A hash containing the error message and location.

Implementation

def message
	{
		text: @error.full_message,
		location: @identity&.to_location
	}
end