Sha256: cfc9c6b1656f9b5358abbfdc47eef037f40ce05856254032ca31bf9a355ba427

Contents?: true

Size: 1.02 KB

Versions: 7

Compression:

Stored size: 1.02 KB

Contents

class TAPReporter < BaseReporter
  defm on_start(stats)
  end

  defm on_spec_start(meta, stats)
  end

  defm on_spec_end(meta, stats)
  end

  defm on_spec_pass(meta, stats)
    name = meta.get_sentence()
    duration_msg = self.get_duration_msg(meta)
    preamble = self.get_preamble('ok', stats.get_count(), meta.get_context())
    self.writer.writeln("#{preamble} ##{name} #{duration_msg}")
  end

  defm on_spec_failure(meta, err, stats)
    name = meta.get_sentence()
    preamble = self.get_preamble('not ok', stats.get_count(), meta.get_context())
    self.writer.writeln("#{preamble} ##{name} - #{err}")
  end

  defm on_spec_error(meta, err, stats)
    name = meta.get_sentence()
    preamble = self.get_preamble('not ok', stats.get_count(), meta.get_context())
    self.writer.writeln("#{preamble} ##{name} - #{err}")
  end

  defm on_spec_pending(meta, stats)
  end

  defm get_preamble(status, count, context)
    ""status = status . repeat(' ', 6 - len(status))
    msg = "#{status} #{count} - #{context}"
    return msg
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
speckle-0.1.10 lib/reporters/tap_reporter.riml
speckle-0.1.9 lib/reporters/tap_reporter.riml
speckle-0.1.8 lib/reporters/tap_reporter.riml
speckle-0.1.7 lib/reporters/tap_reporter.riml
speckle-0.1.4 lib/reporters/tap_reporter.riml
speckle-0.1.3 lib/reporters/tap_reporter.riml
speckle-0.1.2 lib/reporters/tap_reporter.riml