diff --git a/lib/test_boosters/boosters/cucumber.rb b/lib/test_boosters/boosters/cucumber.rb index ba42d8c..865ef3b 100644 --- a/lib/test_boosters/boosters/cucumber.rb +++ b/lib/test_boosters/boosters/cucumber.rb @@ -5,7 +5,7 @@ class Cucumber < Base FILE_PATTERN = "features/**/*.feature".freeze def initialize - super(FILE_PATTERN, split_configuration_path, "bundle exec cucumber") + super(FILE_PATTERN, split_configuration_path, command) end def before_job @@ -16,6 +16,16 @@ def after_job TestBoosters::InsightsUploader.upload("cucumber", report_path) end + def command + @command ||= "bundle exec cucumber #{cucumber_options}" + end + + def cucumber_options + @cucumber_options ||= begin + "#{ENV["TB_CUCUMBER_OPTIONS"]}" + end + end + def display_header super @@ -35,3 +45,5 @@ def split_configuration_path end end end + +