Class: KnapsackPro::Runners::SpinachRunner
- Inherits:
-
BaseRunner
- Object
- BaseRunner
- KnapsackPro::Runners::SpinachRunner
- Defined in:
- lib/knapsack_pro/runners/spinach_runner.rb
Class Method Summary collapse
Methods inherited from BaseRunner
#initialize, #stringify_test_file_paths, #test_dir, #test_file_paths, #test_files_to_execute_exist?
Constructor Details
This class inherits a constructor from KnapsackPro::Runners::BaseRunner
Class Method Details
.run(args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/knapsack_pro/runners/spinach_runner.rb', line 4 def self.run(args) ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN'] = KnapsackPro::Config::Env.test_suite_token_spinach runner = new(KnapsackPro::Adapters::SpinachAdapter) if runner.test_files_to_execute_exist? cmd = %Q[KNAPSACK_PRO_RECORDING_ENABLED=true KNAPSACK_PRO_TEST_SUITE_TOKEN=#{ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN']} bundle exec spinach #{args} --features_path #{runner.test_dir} -- #{runner.stringify_test_file_paths}] Kernel.system(cmd) Kernel.exit($?.exitstatus) unless $?.exitstatus.zero? end end |