Rake 太冗长,回显测试命令 [英] Rake is too verbose, echos test command
本文介绍了Rake 太冗长,回显测试命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Rake 过于冗长:
$ 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
.....................................
这就是我想要的:
$ bundle exec rake test:units
.....................................
我仍然希望看到测试错误 + 失败、弃用警告或任意标准输出哨兵".
I still want to see test errors + failures, deprecation warnings, or arbitrary "stdout sentinels".
这可能吗?谢谢!
推荐答案
如果不修改 rake 任务和/或测试库,您将无法获得此功能.只需删除不需要的行.
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|\/)"
这篇关于Rake 太冗长,回显测试命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文