Class: SleepingKingStudios::Tasks::Ci::CucumberRunner

Inherits:
ProcessRunner
  • Object
show all
Defined in:
lib/sleeping_king_studios/tasks/ci/cucumber_runner.rb

Overview

Service object to run Cucumber as an external process with the specified parameters.

Instance Attribute Summary

Attributes inherited from ProcessRunner

#default_env, #default_options

Instance Method Summary collapse

Methods inherited from ProcessRunner

#initialize

Constructor Details

This class inherits a constructor from SleepingKingStudios::Tasks::ProcessRunner

Instance Method Details

#call(env: {}, files: [], options: [], report: true) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/sleeping_king_studios/tasks/ci/cucumber_runner.rb', line 13

def call env: {}, files: [], options: [], report: true
  report  = 'tmp/ci/cucumber.json' if report && !report.is_a?(String)
  command =
    build_command(
      :env     => env,
      :files   => files,
      :options => options,
      :report  => report
    ) # end build_command

  stream_process(command)

  report ? load_report(:report => report) : {}
end