class RspecTapFormatter

Constants

VERSION

Public Class Methods

new(output) click to toggle source
# File lib/rspec_tap_formatter.rb, line 12
def initialize(output)
  @output = output
  @count = 0
end

Public Instance Methods

example_failed(notification) click to toggle source
# File lib/rspec_tap_formatter.rb, line 30
def example_failed(notification)
  @output << "not ok #{@count} #{notification.example.description}\n"
  @output << "# #{notification.message_lines.join("\n# ")}\n"
end
example_passed(notification) click to toggle source
# File lib/rspec_tap_formatter.rb, line 26
def example_passed(notification)
  @output << "ok #{@count} #{notification.example.description}\n"
end
example_started(notification) click to toggle source
# File lib/rspec_tap_formatter.rb, line 22
def example_started(notification)
  @count += 1
end
start(notification) click to toggle source
# File lib/rspec_tap_formatter.rb, line 17
def start(notification)
  @output << "TAP version 13\n"
  @output << "1..#{notification.count}\n"
end