Class: DTest::Test::CaseResult

Inherits:
Object
  • Object
show all
Includes:
Stopwatch, BAResult
Defined in:
lib/dtest/result.rb

Overview

class Result

Instance Attribute Summary collapse

Attributes included from BAResult

#after_failure, #before_failure

Attributes included from Stopwatch

#finish, #start

Instance Method Summary collapse

Methods included from BAResult

#ba_empty?

Methods included from Stopwatch

#elapsed, #timer

Constructor Details

#initialize(name) ⇒ CaseResult

Returns a new instance of CaseResult.



101
102
103
104
105
106
107
108
109
110
# File 'lib/dtest/result.rb', line 101

def initialize(name)
  super()
  @name = name
  @passed = 0
  @failed = 0
  @executed = 0
  @untested = 0
  # list of Result
  @result = []
end

Instance Attribute Details

#executedObject

Returns the value of attribute executed.



99
100
101
# File 'lib/dtest/result.rb', line 99

def executed
  @executed
end

#failedObject

Returns the value of attribute failed.



99
100
101
# File 'lib/dtest/result.rb', line 99

def failed
  @failed
end

#nameObject

Returns the value of attribute name.



97
98
99
# File 'lib/dtest/result.rb', line 97

def name
  @name
end

#passedObject

Returns the value of attribute passed.



99
100
101
# File 'lib/dtest/result.rb', line 99

def passed
  @passed
end

#resultObject

Returns the value of attribute result.



98
99
100
# File 'lib/dtest/result.rb', line 98

def result
  @result
end

#untestedObject

Returns the value of attribute untested.



99
100
101
# File 'lib/dtest/result.rb', line 99

def untested
  @untested
end

Instance Method Details

#add(result) ⇒ Object



112
113
114
# File 'lib/dtest/result.rb', line 112

def add(result)
  @result << result
end