Class: Teabag::Formatters::TapFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/teabag/formatters/tap_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseFormatter

#errors, #failures, #passes, #pendings, #total

Instance Method Summary collapse

Methods inherited from BaseFormatter

#exception, #initialize, #result

Constructor Details

This class inherits a constructor from Teabag::Formatters::BaseFormatter

Instance Method Details

#error(error) ⇒ Object



19
20
21
# File 'lib/teabag/formatters/tap_formatter.rb', line 19

def error(error)
  @errors << error
end

#runner(result) ⇒ Object



7
8
9
# File 'lib/teabag/formatters/tap_formatter.rb', line 7

def runner(result)
  log "1..#{result.total}"
end

#spec(result) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/teabag/formatters/tap_formatter.rb', line 11

def spec(result)
  super
  @result = result
  return passing_spec if result.passing?
  return pending_spec if result.pending?
  failing_spec
end

#suppress_logs?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/teabag/formatters/tap_formatter.rb', line 23

def suppress_logs?
  true
end