Class/Module Index [+]

Quicksearch

Cucumber::Formatter::Console

This module contains helper methods that are used by formatters that print output to the terminal.

Constants

FORMATS

Public Instance Methods

announce(announcement) click to toggle source

define @delayed_announcements = [] in your Formatter if you want to activate this feature

# File lib/cucumber/formatter/console.rb, line 145
def announce(announcement)
  if @delayed_announcements
    @delayed_announcements << announcement
  else
    if @io
      @io.puts
      @io.puts(format_string(announcement, :tag))
      @io.flush
    end
  end
end
embed(file, mime_type) click to toggle source
# File lib/cucumber/formatter/console.rb, line 139
def embed(file, mime_type)
  # no-op
end
empty_announcements() click to toggle source
# File lib/cucumber/formatter/console.rb, line 174
def empty_announcements
  @delayed_announcements = []
end
format_step(keyword, step_match, status, source_indent) click to toggle source
# File lib/cucumber/formatter/console.rb, line 16
def format_step(keyword, step_match, status, source_indent)
  comment = if source_indent
    c = (' # ' + step_match.file_colon_line).indent(source_indent)
    format_string(c, :comment)
  else
    ''
  end

  format = format_for(status, :param)
  line = keyword + step_match.format_args(format) + comment
  format_string(line, status)
end
format_string(string, status) click to toggle source
# File lib/cucumber/formatter/console.rb, line 29
def format_string(string, status)
  fmt = format_for(status)
  if Proc === fmt
    fmt.call(string)
  else
    fmt % string
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.