Exception: InlineTestFailure

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_type = nil, lhs = nil, rhs = nil, description = nil) ⇒ InlineTestFailure

Returns a new instance of InlineTestFailure.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/inline_test_failure.rb', line 4

def initialize(test_type=nil, lhs=nil, rhs=nil, description=nil)
  super [
    "   #{description} FAILED:",
    "      test_type: #{test_type}",
    "      lhs: #{lhs}",
    "      rhs: #{rhs}"
  ].join "\n"
  self.test_type = test_type
  self.lhs = lhs
  self.rhs = rhs
  self.description = description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/inline_test_failure.rb', line 2

def description
  @description
end

#lhsObject

Returns the value of attribute lhs.



2
3
4
# File 'lib/inline_test_failure.rb', line 2

def lhs
  @lhs
end

#rhsObject

Returns the value of attribute rhs.



2
3
4
# File 'lib/inline_test_failure.rb', line 2

def rhs
  @rhs
end

#test_typeObject

Returns the value of attribute test_type.



2
3
4
# File 'lib/inline_test_failure.rb', line 2

def test_type
  @test_type
end