Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide the list of files when running rspec?

When running rake spec on the command line for a large Rails project, I get a giant list of every rspec file that will be run.

Is there a way to hide that by default?

ruby-1.9.3-p448/bin/ruby -S rspec ./spec/acceptance/replicators/activity_replicator_spec.rb ./spec/acceptance/replicators/template_replicator_spec.rb ./spec/authorization_rules/admin_authorization_rules_spec.rb ...

When I run just rspec (no rake call) I don't get this console output.


EDIT 1

Working from phoet's answer, I tried

RSpec::Core::RakeTask.new(:spec) do |t|
  t.verbose = false
  t.warning = false
  t.rcov = false
end

task :default => :spec

This did not solve the issue.

like image 481
webdevguy Avatar asked Nov 12 '13 17:11

webdevguy


1 Answers

The last time I did this, I had to clear the rake task first.

if defined? RSpec
  task(:spec).clear
  RSpec::Core::RakeTask.new(:spec) do |t|
    t.verbose = false
  end
end

http://singlebrook.com/blog/disable-rspec-verbosity-to-hide-spec-list

like image 130
Jared Beck Avatar answered Oct 02 '22 14:10

Jared Beck