Module: Expectations::Results::StateBasedFailure

Includes:
Expectations::Results
Defined in:
lib/expectations/results.rb

Instance Attribute Summary collapse

Method Summary

Methods included from Expectations::Results

#error?, #failure?, #fulfilled?, included, #initialize

Instance Attribute Details

#messageObject



36
37
38
39
40
41
# File 'lib/expectations/results.rb', line 36

def message
  return @message if @message
  result = "expected: <#{expected.inspect}> got: <#{actual.inspect}>"
  result += "\nstring details: #{expected.diff(actual)}" if expected.is_a?(String) && actual.is_a?(String)
  result
end