Class: Cucover::CliCommands::Cucumber

Inherits:
Object
  • Object
show all
Defined in:
lib/cucover/cli_commands/cucumber.rb

Constant Summary collapse

LANGUAGE =
'rb'

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cli_args) ⇒ Cucumber

Returns a new instance of Cucumber.



11
12
13
14
# File 'lib/cucover/cli_commands/cucumber.rb', line 11

def initialize(cli_args)
  Cucumber.exit_status = 0
  @cli_args = cli_args
end

Class Attribute Details

.exit_statusObject

Returns the value of attribute exit_status.



8
9
10
# File 'lib/cucover/cli_commands/cucumber.rb', line 8

def exit_status
  @exit_status
end

Instance Method Details

#executeObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/cucover/cli_commands/cucumber.rb', line 16

def execute
  require 'rubygems'
  require 'cucumber'

  step_mother = ::Cucumber::StepMother.new
  step_mother.load_programming_language(LANGUAGE)
  require 'cucover/cucumber_hooks'

  execute_cuke do
    ::Cucumber::Cli::Main.new(ARGV).execute!(step_mother)
  end
end