1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
module Knapsack
module Runners
class CucumberRunner
def self.run(args)
allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::CucumberAdapter).allocator
Knapsack.logger.info
Knapsack.logger.info 'Report features:'
Knapsack.logger.info allocator.report_node_tests
Knapsack.logger.info
Knapsack.logger.info 'Leftover features:'
Knapsack.logger.info allocator.leftover_node_tests
Knapsack.logger.info
cmd = %Q[bundle exec cucumber #{args} --require #{allocator.test_dir} -- #{allocator.stringify_node_tests}]
system(cmd)
exit($?.exitstatus) unless $?.exitstatus == 0
end
end
end
end
|