Class Cucumber::StepMother
In: lib/cucumber/step_mother.rb
Parent: Object

This is the meaty part of Cucumber that ties everything together.

Methods

Included Modules

Constantize Formatter::Duration

Classes and Modules

Class Cucumber::StepMother::StepInvoker

Attributes

log  [W] 
options  [W] 
visitor  [W] 

Public Class methods

Public Instance methods

Output announcement alongside the formatted output. This is an alternative to using Kernel#puts - it will display nicer, and in all outputs (in case you use several formatters)

Suspends execution and prompts question to the console (STDOUT). An operator (manual tester) can then enter a line of text and hit <ENTER>. The entered text is returned, and both question and the result is added to the output using announce.

If you want a beep to happen (to grab the manual tester‘s attention), just prepend ASCII character 7 to the question:

  ask("#{7.chr}How many cukes are in the external system?")

If that doesn‘t issue a beep, you can shell out to something else that makes a sound before invoking ask.

Embed file of MIME type mime_type into the output. This may or may not be ignored, depending on what kind of formatter(s) are active.

Invokes a series of steps steps_text. Example:

  invoke(%Q{
    Given I have 8 cukes in my belly
    Then I should not be thirsty
  })

Loads and registers programming language implementation. Instances are cached, so calling with the same argument twice will return the same instance.

Returns the options passed on the command line.

Returns a regular String for string_with_triple_quotes. Example:

  """
   hello
  world
  """

Is retured as: " hello\nworld"

Returns a Cucumber::Ast::Table for text_or_table, which can either be a String:

  table(%{
    | account | description | amount |
    | INT-100 | Taxi        | 114    |
    | CUC-101 | Peeler      | 22     |
  })

or a 2D Array:

  table([
    %w{ account description amount },
    %w{ INT-100 Taxi        114    },
    %w{ CUC-101 Peeler      22     }
  ])

[Validate]