Sha256: f10f75eb1195389bf36240276a102bd607040782df69b35286051d5acc06b063

Contents?: true

Size: 810 Bytes

Versions: 87

Compression:

Stored size: 810 Bytes

Contents

module KnapsackPro
  module Runners
    class CucumberRunner < BaseRunner
      def self.run(args)
        ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN'] = KnapsackPro::Config::Env.test_suite_token_cucumber
        ENV['KNAPSACK_PRO_RECORDING_ENABLED'] = 'true'

        runner = new(KnapsackPro::Adapters::CucumberAdapter)

        if runner.test_files_to_execute_exist?
          require 'cucumber/rake/task'

          task_name = 'knapsack_pro:cucumber_run'
          if Rake::Task.task_defined?(task_name)
            Rake::Task[task_name].clear
          end

          Cucumber::Rake::Task.new(task_name) do |t|
            t.cucumber_opts = "#{args} --require #{runner.test_dir} -- #{runner.stringify_test_file_paths}"
          end
          Rake::Task[task_name].invoke
        end
      end
    end
  end
end

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
knapsack_pro-2.1.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-2.0.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.22.3 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.22.2 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.22.1 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.22.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.21.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.20.2 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.20.1 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.20.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.19.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.18.2 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.18.1 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.18.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.17.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.16.1 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.16.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.15.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.14.0 lib/knapsack_pro/runners/cucumber_runner.rb
knapsack_pro-1.13.0 lib/knapsack_pro/runners/cucumber_runner.rb