Sha256: 761c5cb732b2b7bcd30a07e6903ba47405d0cbd4fc0f08911937331ec200066d

Contents?: true

Size: 1.02 KB

Versions: 18

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}")
    self.flush_log_buffer()
  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.get_message()}")
    self.print_stacktrace(err)
    self.flush_log_buffer()
  end

  defm on_spec_error(meta, err, stats)
    self.on_spec_failure(meta, err, stats)
  end

  defm on_spec_pending(meta, stats)
  end

  defm get_preamble(status, count, context)
    msg = "#{status} #{count} - #{context}"
    return msg
  end

  defm write_stacktrace_line(line)
    self.writer.writeln("  #{line}")
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
speckle-0.2.0 lib/reporters/tap_reporter.riml
speckle-0.1.31 lib/reporters/tap_reporter.riml
speckle-0.1.30 lib/reporters/tap_reporter.riml
speckle-0.1.29 lib/reporters/tap_reporter.riml
speckle-0.1.28 lib/reporters/tap_reporter.riml
speckle-0.1.27 lib/reporters/tap_reporter.riml
speckle-0.1.26 lib/reporters/tap_reporter.riml
speckle-0.1.25 lib/reporters/tap_reporter.riml
speckle-0.1.24 lib/reporters/tap_reporter.riml
speckle-0.1.23 lib/reporters/tap_reporter.riml
speckle-0.1.22 lib/reporters/tap_reporter.riml
speckle-0.1.21 lib/reporters/tap_reporter.riml
speckle-0.1.20 lib/reporters/tap_reporter.riml
speckle-0.1.19 lib/reporters/tap_reporter.riml
speckle-0.1.18 lib/reporters/tap_reporter.riml
speckle-0.1.17 lib/reporters/tap_reporter.riml
speckle-0.1.16 lib/reporters/tap_reporter.riml
speckle-0.1.15 lib/reporters/tap_reporter.riml