Module: Guard::Ecukes::Runner

Defined in:
lib/guard/ecukes/runner.rb

Overview

The Ecukes runner handles the execution of the ecukes binary.

Class Method Summary collapse

Class Method Details

.run(paths, options = { }) ⇒ Boolean

Run the supplied features.

Parameters:

  • paths (Array<String>)

    the feature files or directories

  • options (Hash) (defaults to: { })

    the options for the execution

Options Hash (options):

  • :command_prefix (String)

    allows adding an additional prefix to the ecukes command.

Returns:

  • (Boolean)

    the status of the execution



16
17
18
19
20
21
22
23
24
# File 'lib/guard/ecukes/runner.rb', line 16

def run(paths, options = { })
  return false if paths.empty?

  message = options[:message] || (paths == ['features'] ? "Running all Ecukes features: #{ ecukes_command(paths, options) }" : "Running Ecukes features: #{ ecukes_command(paths, options) }")

  UI.info message, :reset => true

  system(ecukes_command(paths, options))
end