class Baleen::Task::Cucumber

Attributes

target_files[R]

Public Class Methods

new(opt) click to toggle source
Calls superclass method Baleen::Task::Base::new
# File lib/baleen/task/cucumber.rb, line 12
def initialize(opt)
  super()
  @params[:bin]            = opt[:bin]            || "bundle exec cucumber"
  @params[:options]        = opt[:options]
  @params[:work_dir]       = opt[:work_dir]       || default_work_dir
  @params[:files]          = opt[:files]          || default_features
  @params[:concurrency]    = opt[:concurrency]    || default_concurrency
  @params[:before_command] = opt[:before_command] || default_before_command
  @params[:image]          = opt[:image]
  @params[:command]        = opt[:command]
  @params[:results]        = opt[:results]
  @params[:status]         = opt[:status]
  @params[:commit]         = nil
end

Public Instance Methods

prepare() click to toggle source
# File lib/baleen/task/cucumber.rb, line 27
def prepare
  task = Generic.new(
    work_dir: work_dir,
    image:    image,
    command:  %{find #{files} | grep "\\.feature"}
  )
  runner = Baleen::Runner.new(task)
  result = runner.run
  @target_files = result[:stdout]
end