Class: EEtee::Reporters::Text
- Inherits:
-
EEtee::Reporter
- Object
- EEtee::Reporter
- EEtee::Reporters::Text
- Defined in:
- lib/eetee/reporters/text.rb
Overview
Basic text output.
Instance Attribute Summary
Attributes inherited from EEtee::Reporter
#assertion_count, #empty, #errors, #failures, #test_count
Instance Method Summary collapse
Methods inherited from EEtee::Reporter
#add_error, #increment_assertions, #initialize
Constructor Details
This class inherits a constructor from EEtee::Reporter
Instance Method Details
#around_context(ctx, &block) ⇒ Object
10 11 12 13 14 |
# File 'lib/eetee/reporters/text.rb', line 10 def around_context(ctx, &block) puts "" if @indent == 0 iputs "# #{ctx.description}:" super end |
#around_test(test, &block) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/eetee/reporters/text.rb', line 16 def around_test(test, &block) iprint "- #{test.label}... " case super when :empty then puts "EMPTY" when :ok then puts "OK" when :failed then puts "FAILED" when :error then puts "ERROR" end end |
#report_results ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/eetee/reporters/text.rb', line 26 def report_results report_failures() unless @failures.empty? report_errors() unless @errors.empty? puts "" puts "#{@test_count} Tests / #{@assertion_count} Assertions" puts "#{@errors.size} Errors / #{@failures.size} failures" end |