Exception: Spectre::Assertion::AssertionFailure

Inherits:
ExpectationFailure show all
Defined in:
lib/spectre/assertion.rb

Instance Attribute Summary collapse

Attributes inherited from ExpectationFailure

#expectation

Instance Method Summary collapse

Constructor Details

#initialize(message, expected = nil, actual = nil, expectation = nil) ⇒ AssertionFailure

Returns a new instance of AssertionFailure.



237
238
239
240
241
# File 'lib/spectre/assertion.rb', line 237

def initialize message, expected=nil, actual=nil, expectation=nil
  super message, expectation
  @expected = expected
  @actual = actual
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



235
236
237
# File 'lib/spectre/assertion.rb', line 235

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



235
236
237
# File 'lib/spectre/assertion.rb', line 235

def expected
  @expected
end