Rake is too verbose, echos test command
Asked Answered
M

1

1

Rake is too verbose:

$ bundle exec rake test:units
/Users/jared/.rvm/rubies/ruby-1.8.7-p370/bin/ruby -I"lib:test" -I"/Users/jared/.rvm/gems/ruby-1.8.7-p370@global/gems/rake-0.9.2.2/lib" "/Users/jared/.rvm/gems/ruby-1.8.7-p370@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/unit/**/*_test.rb" 
Loaded suite /Users/jared/.rvm/gems/ruby-1.8.7-p370@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
.....................................

This is what I want:

$ bundle exec rake test:units
.....................................

I still want to see test errors + failures, deprecation warnings, or arbitrary "stdout sentinels".

Is this possible? Thanks!

Murr answered 1/10, 2012 at 18:3 Comment(0)
L
1

You won't get this without modifying the rake task and/or the test library. Just grep out the undesired lines.

bundle exec rake test:units | grep -vP "^(Started|Loaded|\/)"
Leroy answered 1/10, 2012 at 18:12 Comment(2)
Thanks, but I'd like a solution that will automatically be shared with my colleagues. Can I get rid of any of these lines without resorting to grep?Murr
You could always write your own rake task in your project Rakefile that isn't as noisy but does the same thing. The output is exactly what you need to run, so you're already half-way there.Quadrillion

© 2022 - 2024 — McMap. All rights reserved.