如何更快地显示rspec错误?

ibl*_*lue 2 rspec ruby-on-rails

我的rspec测试套件很慢.运行所有测试大约需要五年时间.在它运行时,我只看到测试失败了.

.......................................................................
.......FFFFFFFFFFFFFFF....F..........FFFFFFFFF.........................
................FFFFFFFFFFFFFFF.....................FF.................
..........................FFF..........................................
.............FFFFFFFFFFFFFFFFFFFFFF....................................
................................................................FFFF...
.......FFFFFFFFF..........................
Run Code Online (Sandbox Code Playgroud)

然后,在盯着这几年后,我终于得到了一个错误列表.

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)>'
Run Code Online (Sandbox Code Playgroud)

有没有办法告诉rspec它应该直接显示错误 - 运行测试套件?

Dou*_*gui 6

您可以使用fuubar格式,请参阅此处的文档:https://github.com/jeffkreeftmeijer/fuubar/