Class: Knapsack::Runners::CucumberRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/knapsack/runners/cucumber_runner.rb

Class Method Summary collapse

Class Method Details

.run(args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/knapsack/runners/cucumber_runner.rb', line 4

def self.run(args)
  allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::CucumberAdapter).allocator

  puts
  puts 'Report features:'
  puts allocator.report_node_tests
  puts
  puts 'Leftover features:'
  puts allocator.leftover_node_tests
  puts

  cmd = %Q[bundle exec cucumber #{args} -- #{allocator.stringify_node_tests}]

  system(cmd)
  exit($?.exitstatus) unless $?.exitstatus.zero?
end