title: Rake / Rspec: How to suppress / quiet / silent the first output line showing the command with --pattern ?
body: <h2>Problem:</h2>
  
  <p>If I run <code>ServerSpec</code> (based on <code>RSpec</code>) through <code>Rake</code> with one of the following commands:</p>
  
  <ul>
  <li><code>rake</code></li>
  <li><code>rake spec</code></li>
  <li><code>rake spec:all</code></li>
  <li><code>rake spec:&lt;host&gt;</code></li>
  <li><code>bundle exec rake</code> </li>
  <li>...</li>
  </ul>
  
  <p>Rake prints the command it executes to <code>stdout</code> before the serverspec output:</p>
  
  <pre><code>/usr/bin/ruby1.9.1 
  -I/var/lib/gems/1.9.1/gems/rspec-core-3.1.6/lib:/var/lib/gems/1.9.1/gems/rspec-support-3.1.2/lib 
  /var/lib/gems/1.9.1/gems/rspec-core-3.1.6/exe/rspec 
  --pattern spec/&lt;host&gt;/\*_spec.rb
  </code></pre>
  
  <p>If I pass the target host manually to <code>rspec</code> like this ...</p>
  
  <pre><code>TARGET_HOST=&lt;host&gt; rspec
  </code></pre>
  
  <p>... the line does <strong>NOT</strong> show up.</p>
  
  <h2>Question:</h2>
  
  <p>How can I prevent <code>Rake</code> from outputting this line / the command?</p>
  
  <hr>
  
  <p>I'm using the default Rakefile generated by <code>serverspec-init</code>.</p>
  
  <pre><code>require 'rake'
  require 'rspec/core/rake_task'
  
  task :spec    =&gt; 'spec:all'
  task :default =&gt; :spec
  
  namespace :spec do
    targets = []
    Dir.glob('./spec/*').each do |dir|
      next unless File.directory?(dir)
      targets &lt;&lt; File.basename(dir)
    end
  
    task :all     =&gt; targets
    task :default =&gt; :all
  
    targets.each do |target|
      desc "Run serverspec tests to #{target}"
      RSpec::Core::RakeTask.new(target.to_sym) do |t|
        ENV['TARGET_HOST'] = target
        t.pattern = "spec/#{target}/*_spec.rb"
      end
    end
  end
  </code></pre>