Class: Oktest::BaseReporter
Constant Summary
collapse
- LABELS =
{ :PASS=>'pass', :FAIL=>'Fail', :ERROR=>'ERROR', :SKIP=>'Skip', :TODO=>'TODO' }
- CHARS =
{ :PASS=>'.', :FAIL=>'f', :ERROR=>'E', :SKIP=>'s', :TODO=>'t' }
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Reporter
#order_policy
Constructor Details
Returns a new instance of BaseReporter.
1744
1745
1746
1747
|
# File 'lib/oktest.rb', line 1744
def initialize()
@exceptions = []
@counts = {}
end
|
Instance Attribute Details
#counts ⇒ Object
Returns the value of attribute counts.
1749
1750
1751
|
# File 'lib/oktest.rb', line 1749
def counts
@counts
end
|
Instance Method Details
#enter_all(runner) ⇒ Object
1751
1752
1753
1754
1755
|
# File 'lib/oktest.rb', line 1751
def enter_all(runner)
reset_counts()
@start_at = Time.now
end
|
#enter_scope(scope) ⇒ Object
1763
1764
|
# File 'lib/oktest.rb', line 1763
def enter_scope(scope)
end
|
#enter_spec(spec, depth) ⇒ Object
1775
1776
|
# File 'lib/oktest.rb', line 1775
def enter_spec(spec, depth)
end
|
#enter_topic(topic, depth) ⇒ Object
1769
1770
|
# File 'lib/oktest.rb', line 1769
def enter_topic(topic, depth)
end
|
#exit_all(runner) ⇒ Object
1757
1758
1759
1760
1761
|
# File 'lib/oktest.rb', line 1757
def exit_all(runner)
elapsed = Time.now - @start_at
puts (elapsed)
end
|
#exit_scope(scope) ⇒ Object
1766
1767
|
# File 'lib/oktest.rb', line 1766
def exit_scope(scope)
end
|
#exit_spec(spec, depth, status, exc, parent) ⇒ Object
1778
1779
1780
1781
1782
1783
|
# File 'lib/oktest.rb', line 1778
def exit_spec(spec, depth, status, exc, parent)
@counts[status] += 1
@exceptions << [spec, status, exc, parent] if status == :FAIL || status == :ERROR
end
|
#exit_topic(topic, depth) ⇒ Object
1772
1773
|
# File 'lib/oktest.rb', line 1772
def exit_topic(topic, depth)
end
|