2012-07-23 67 views
2

我的rspec測試套件很慢。運行所有測試需要大約五年的時間。當它運行時,我只看到測試失敗。如何更快顯示rspec錯誤?

....................................................................... 
.......FFFFFFFFFFFFFFF....F..........FFFFFFFFF......................... 
................FFFFFFFFFFFFFFF.....................FF................. 
..........................FFF.......................................... 
.............FFFFFFFFFFFFFFFFFFFFFF.................................... 
................................................................FFFF... 
.......FFFFFFFFF.......................... 

然後,在這盯着幾年後,我終於得到了什麼是錯的列表。

Failures: 

    172481) Foobar should barfoo the barbaz while quux is set to narf 
    Failure/Error: before { click_link "Enable narf" } 
    ArgumentError: 
     wrong number of arguments (0 for 1) 
    # ./app/helpers/foobar_helper.rb:22:in `gobble' 
    # ./app/controllers/barbaz_controller.rb:18:in `omgwtf' 
    # (eval):2:in `click_link' 
    # ./spec/requests/metasyntactic_spec.rb:43:in `block (5 levels) in <top (required)>' 

有沒有辦法告訴rspec的,應該直接顯示錯誤 - 在運行測試套件?

回答

6

可以使用fuubar格式,看到這裏的文檔:https://github.com/jeffkreeftmeijer/fuubar/

+0

太好了!它甚至顯示一個ETA!測試很有趣! :) – iblue 2012-07-23 12:07:11

+0

如果您同意,請批准答案。 – Dougui 2012-07-23 12:09:07

+0

需要兩分鐘時間...(請參閱http://meta.stackexchange.com/q/50697) – iblue 2012-07-23 12:11:45