Class: Test::Unit::SubTestResult

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/sub-test-result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent_test_result) ⇒ SubTestResult

Returns a new instance of SubTestResult.



12
13
14
15
# File 'lib/test/unit/sub-test-result.rb', line 12

def initialize(parent_test_result)
  @parent_test_result = parent_test_result
  @stop_tag = nil
end

Instance Attribute Details

#stop_tagObject

Returns the value of attribute stop_tag.



10
11
12
# File 'lib/test/unit/sub-test-result.rb', line 10

def stop_tag
  @stop_tag
end

Instance Method Details

#add_assertionObject

Records an individual assertion.



26
27
28
# File 'lib/test/unit/sub-test-result.rb', line 26

def add_assertion
  @parent_test_result.add_assertion
end

#add_error(error) ⇒ Object



30
31
32
# File 'lib/test/unit/sub-test-result.rb', line 30

def add_error(error)
  @parent_test_result.add_error(error)
end

#add_failure(failure) ⇒ Object



34
35
36
# File 'lib/test/unit/sub-test-result.rb', line 34

def add_failure(failure)
  @parent_test_result.add_failure(failure)
end

#add_omission(omission) ⇒ Object



38
39
40
# File 'lib/test/unit/sub-test-result.rb', line 38

def add_omission(omission)
  @parent_test_result.add_omission(omission)
end

#add_passObject



21
22
23
# File 'lib/test/unit/sub-test-result.rb', line 21

def add_pass
  @parent_test_result.add_pass
end

#add_run(result = self) ⇒ Object



17
18
19
# File 'lib/test/unit/sub-test-result.rb', line 17

def add_run(result=self)
  @parent_test_result.add_run(result)
end

#passed?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/test/unit/sub-test-result.rb', line 42

def passed?
  @parent_test_result.passed?
end

#stopObject



46
47
48
# File 'lib/test/unit/sub-test-result.rb', line 46

def stop
  throw @stop_tag
end