问题
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!
回答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|\/)"
来源:https://stackoverflow.com/questions/12678536/rake-is-too-verbose-echos-test-command