Module: Guard::Cucumber::Runner

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

Overview

The Cucumber runner handles the execution of the cucumber 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):

  • :feature_sets (Array<String>)

    a list of non-standard feature directory/ies

  • :bundler (Boolean)

    use bundler or not

  • :rvm (Array<String>)

    a list of rvm version to use for the test

  • :notification (Boolean)

    show notifications

Returns:

  • (Boolean)

    the status of the execution



19
20
21
22
23
24
25
26
# File 'lib/guard/cucumber/runner.rb', line 19

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

  message = options[:message] || (paths == ['features'] ? "Running all Cucumber features: #{ cucumber_command(paths, options) }" : "Running Cucumber features: #{ cucumber_command(paths, options) }")
  UI.info message, :reset => true

  system(cucumber_command(paths, options))
end