# File lib/autotest/cucumber_mixin.rb, line 104
  def make_cucumber_cmd(features_to_run, dirty_features_filename)
    return '' if features_to_run == ''
    
    profiles = YAML.load_file("cucumber.yml").keys rescue []
    
    profile ||= "autotest-all" if profiles.include?("autotest-all") and features_to_run == :all
    profile ||= "autotest"     if profiles.include?("autotest")
    profile ||= nil
    
    if profile
      args = ["--profile", profile]
    else
      args = %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" : features_to_run)
    args = args.join(' ')

    return "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} #{args}"
  end