module Autotest::CucumberMixin

def created_args(features_to_run, profile)

def created_args(features_to_run, profile)
  args = if profile
           ['--profile', profile]
         else
           %w[--format] << (features_to_run == :all ? 'progress' : 'pretty')
         end
  # No --color option as some IDEs (Netbeans) don't output them very well (1 failed step)
  args += %w[--format rerun --out] << dirty_features_filename
  args << (features_to_run == :all ? '' : features_to_run)
  # All steps becom undefined during rerun unless the following is run.
  args << 'features/step_definitions' << 'features/support' unless features_to_run == :all
  args.join(' ')
end