Sha256: ba74479ecf2570baaebfdecab0f7ca0c50a1247dbc7ca431dc9217ff2c93d1f6

Contents?: true

Size: 755 Bytes

Versions: 6

Compression:

Stored size: 755 Bytes

Contents

module KnapsackPro
  module Runners
    class SpinachRunner < BaseRunner
      def self.run(args)
        ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN'] = KnapsackPro::Config::Env.test_suite_token_spinach

        adapter_class = KnapsackPro::Adapters::SpinachAdapter
        runner = new(adapter_class)

        if runner.test_files_to_execute_exist?
          adapter_class.verify_bind_method_called

          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
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
knapsack_pro-2.16.0 lib/knapsack_pro/runners/spinach_runner.rb
knapsack_pro-2.15.0 lib/knapsack_pro/runners/spinach_runner.rb
knapsack_pro-2.14.0 lib/knapsack_pro/runners/spinach_runner.rb
knapsack_pro-2.13.0 lib/knapsack_pro/runners/spinach_runner.rb
knapsack_pro-2.12.0 lib/knapsack_pro/runners/spinach_runner.rb
knapsack_pro-2.11.0 lib/knapsack_pro/runners/spinach_runner.rb