Exception: Tst::Failure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/tst.rb

Overview

An error class that carries data about test failures.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, expected, actual) ⇒ Failure

Returns a new instance of Failure.



10
11
12
13
14
15
# File 'lib/tst.rb', line 10

def initialize(message, expected, actual)
  @message = message
  @expected = expected
  @actual = actual
  super(message)
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



8
9
10
# File 'lib/tst.rb', line 8

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



8
9
10
# File 'lib/tst.rb', line 8

def expected
  @expected
end

#messageObject (readonly)

Returns the value of attribute message.



8
9
10
# File 'lib/tst.rb', line 8

def message
  @message
end