# File lib/autotest/cucumber_mixin.rb, line 108
  def make_cucumber_cmd(features_to_run, dirty_features_filename)
    return '' if features_to_run == ''
    
    profile_loader = Cucumber::Cli::ProfileLoader.new
    
    profile ||= "autotest-all" if profile_loader.has_profile?("autotest-all") && features_to_run == :all
    profile ||= "autotest"     if profile_loader.has_profile?("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_to_run)
    
    # Unless I do this, all the steps turn up undefined during the rerun...
    unless features_to_run == :all
      args << 'features/step_definitions' << 'features/support'
    end
    
    args = args.join(' ')

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