Class: RSpec::EnrichedJson::EnrichedExpectationNotMetError

Inherits:
RSpec::Expectations::ExpectationNotMetError
  • Object
show all
Defined in:
lib/rspec/enriched_json/enriched_expectation_not_met_error.rb

Overview

Custom exception that carries structured data alongside the message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, details = {}) ⇒ EnrichedExpectationNotMetError

Returns a new instance of EnrichedExpectationNotMetError.



11
12
13
14
# File 'lib/rspec/enriched_json/enriched_expectation_not_met_error.rb', line 11

def initialize(message, details = {})
  super(message)
  @details = details
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



9
10
11
# File 'lib/rspec/enriched_json/enriched_expectation_not_met_error.rb', line 9

def details
  @details
end