thoughtbot / vim-rspec

Run Rspec specs from Vim
https://robots.thoughtbot.com
MIT License
656 stars 108 forks source link

RSpec 3.4 (?) breaks the quickfix list output #105

Closed dgmstuart closed 8 years ago

dgmstuart commented 8 years ago

For a while now I've noticed that rspec.vim when combined with vim-dispatch hasn't been giving me those nice links that I can use to jump to the next issue with :cn. I think I've managed to isolate this to having broken in upgrading to version 3.4.0 of RSpec (see output below).

I'm using the master branch of vim-rspec and vim-dispatch with tmux 2.1 and the latest vim.

The rspec command I'm using is Dispatch bundle exec rspec spec --format=progress

Changing the formatter or not specifying it doesn't seem to have any effect.

The main difference seems to be that in 3.3 the quickfix list is the output of the rspec command, whereas in 3.4 it's some location in var (???).

My guess is that this issue is related to the failure output improvements introduced in 3.4 - though it doesn't look like the output is actually very different (see screenshots at the end)

Let me know what other information I can provide to help debug this and/or if there's a way to export the quickfix list to a plain text file.

With RSpec version 3.3.0: screen shot 2015-12-22 at 12 34 46

48   gem 'rspec-rails', '~> 3.3.0'
(10) Gemfile [ruby] [Git(feature/html-view-improvements)]                                                                                                                                                                1              (7/71)
  9 ||·
  8 ||·
  7 || Failures:
  6 ||·
  5 spec/services/pipeline_org_finder_spec.rb|12 error|  Failure/Error: expect(service.call(145).name).to eq "foo one" expected: "foo one" got: "this one" (compared using ==)
  4 ||·
  3 || Finished in 10.61 seconds (files took 5.83 seconds to load)
  2 || 81 examples, 1 failure, 6 pending
  1 ||·
28  || Failed examples:
[Quickfix List] :bundle exec rspec spec --format=progress

With RSpec version 3.4.0: screen shot 2015-12-22 at 12 38 26

48   gem 'rspec-rails', '~> 3.4.0'
(10) Gemfile [ruby] [Git(feature/html-view-improvements)]                                                                                                                                                                1              (7/71)
27  ||······
  1 ||        (compared using ==)
  2 ||      # ./spec/services/pipeline_org_finder_spec.rb:12:in `block (3 levels) in <top (required)>'
  3 ||·
  4 || Finished in 10.64 seconds (files took 5.75 seconds to load)
  5 || 81 examples, 1 failure, 6 pending
  6 ||·
  7 || Failed examples:
  8 ||·
  9 || rspec ./spec/services/pipeline_org_finder_spec.rb:6 # PipelineOrgFinder.call selects the right organisation based on URN
[Quickfix List] :noautocmd cgetfile /var/folders/z1/1ymmlq412nj_ld4y7v_7lxtw0000gn/T/vCoyZtR/336

Note that the output when running rspec outside of vim appears identical except for syntax highlighting:

3.3.0: screen shot 2015-12-22 at 12 57 43

3.4.0: screen shot 2015-12-22 at 12 59 29

dgmstuart commented 8 years ago

I'm downgrading to 3.3 for now - not so much of an issue since some of the major changes are around improvements to failure output, and in vim I'm mostly interested in seeing a binary success/fail.

dgmstuart commented 8 years ago

Ah found it - this is an issue in the rspec compiler (?) in vim-ruby - fixed on master: https://github.com/vim-ruby/vim-ruby/pull/284