Class: Kender::Cucumber
Instance Attribute Summary
Attributes inherited from Command
#success
Instance Method Summary
collapse
Methods inherited from Command
all, all_names, all_success?, commands, #execute, inherited, #name, #run
Instance Method Details
#available? ⇒ Boolean
4
5
6
|
# File 'lib/kender/commands/cucumber.rb', line 4
def available?
%w[cucumber cucumber-rails].any? { |gem| in_gemfile?(gem) } && !ENV['VALIDATE_PROJECT']
end
|
#command ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/kender/commands/cucumber.rb', line 8
def command
= ENV['HEADED_BROWSER'] ? "HEADED_BROWSER=#{ENV['HEADED_BROWSER']}" : ''
if defined?(Knapsack)
knapsack_env = "CI_NODE_TOTAL=#{ENV['CI_NODE_TOTAL']} CI_NODE_INDEX=#{ENV['CI_NODE_INDEX']}"
"#{} #{knapsack_env} bundle exec rake knapsack:cucumber"
elsif defined?(ParallelTests)
"#{} bundle exec rake parallel:features"
else
"#{} bundle exec cucumber"
end
end
|