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
Constructor Details
Returns a new instance of BaseReporter.
1442
1443
1444
1445
|
# File 'lib/oktest.rb', line 1442
def initialize
@exceptions = []
@counts = {}
end
|
Instance Attribute Details
#counts ⇒ Object
Returns the value of attribute counts.
1447
1448
1449
|
# File 'lib/oktest.rb', line 1447
def counts
@counts
end
|
Instance Method Details
#enter_all(runner) ⇒ Object
1449
1450
1451
1452
1453
|
# File 'lib/oktest.rb', line 1449
def enter_all(runner)
reset_counts()
@start_at = Time.now
end
|
#enter_scope(scope) ⇒ Object
1461
1462
|
# File 'lib/oktest.rb', line 1461
def enter_scope(scope)
end
|
#enter_spec(spec, depth) ⇒ Object
1473
1474
|
# File 'lib/oktest.rb', line 1473
def enter_spec(spec, depth)
end
|
#enter_topic(topic, depth) ⇒ Object
1467
1468
|
# File 'lib/oktest.rb', line 1467
def enter_topic(topic, depth)
end
|
#exit_all(runner) ⇒ Object
1455
1456
1457
1458
1459
|
# File 'lib/oktest.rb', line 1455
def exit_all(runner)
elapsed = Time.now - @start_at
puts (elapsed)
end
|
#exit_scope(scope) ⇒ Object
1464
1465
|
# File 'lib/oktest.rb', line 1464
def exit_scope(scope)
end
|
#exit_spec(spec, depth, status, exc, parent) ⇒ Object
1476
1477
1478
1479
1480
1481
|
# File 'lib/oktest.rb', line 1476
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
1470
1471
|
# File 'lib/oktest.rb', line 1470
def exit_topic(topic, depth)
end
|