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.
1881
1882
1883
1884
|
# File 'lib/oktest.rb', line 1881
def initialize()
@exceptions = []
@counts = {}
end
|
Instance Attribute Details
#counts ⇒ Object
Returns the value of attribute counts.
1886
1887
1888
|
# File 'lib/oktest.rb', line 1886
def counts
@counts
end
|
Instance Method Details
#enter_all(runner) ⇒ Object
1888
1889
1890
1891
1892
|
# File 'lib/oktest.rb', line 1888
def enter_all(runner)
reset_counts()
@start_at = Time.now
end
|
#enter_scope(scope) ⇒ Object
1900
1901
|
# File 'lib/oktest.rb', line 1900
def enter_scope(scope)
end
|
#enter_spec(spec, depth) ⇒ Object
1912
1913
|
# File 'lib/oktest.rb', line 1912
def enter_spec(spec, depth)
end
|
#enter_topic(topic, depth) ⇒ Object
1906
1907
|
# File 'lib/oktest.rb', line 1906
def enter_topic(topic, depth)
end
|
#exit_all(runner) ⇒ Object
1894
1895
1896
1897
1898
|
# File 'lib/oktest.rb', line 1894
def exit_all(runner)
elapsed = Time.now - @start_at
puts (elapsed)
end
|
#exit_scope(scope) ⇒ Object
1903
1904
|
# File 'lib/oktest.rb', line 1903
def exit_scope(scope)
end
|
#exit_spec(spec, depth, status, exc, parent) ⇒ Object
1915
1916
1917
1918
1919
1920
|
# File 'lib/oktest.rb', line 1915
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
1909
1910
|
# File 'lib/oktest.rb', line 1909
def exit_topic(topic, depth)
end
|