Skip to content

Rspec2 compiler #16

Closed
wants to merge 4 commits into from

3 participants

@tooky
tooky commented Oct 25, 2010

We've put together a simple rspec2 compiler. It picks up on basic error messages, but the pattern matching can probably be improved.

Steve and Tom

@tpope
Vim-Ruby member
tpope commented Oct 25, 2010

What changes did you make to the 'errorformat', if any? (Other than the first line that was also in the other pull request, that will be addressed separately). I was actually thinking of just switching the rspec compiler plugin to rspec 2; by the time there's another Vim release I imagine virtually everyone will have switched.

@tooky
tooky commented Oct 25, 2010

Its not quite the same as Tom's original change. The new rspec2 output appears to be indented, so we matched the whitespace at the start of the lines. Not sure if that's the best way to do it?

We were thinking that the patterns could all live in the same compiler, and perhaps have the executable as a configurable option? Default that for rspec2 and allow people to set it for rspec1.

@tpope
Vim-Ruby member
tpope commented Oct 25, 2010

That's what I'm thinking, only instead of bothering with a configurable option, one could just compiler rspec | setl makeprg=spec.

@tooky
tooky commented Oct 25, 2010

Yeah that would work fine, of course.

Latest version of this branch has combined the errorformat patterns and set makeprg as rspec.

Steve Tooke Add rspec2 errorformat to rspec compiler.
rspec compiler expects 'rspec' as makeprg - rspec2 executable.
d0cbf8f
@tpope
Vim-Ruby member
tpope commented Aug 23, 2011

I have returned! It turns out the current compiler/rspec.vim doesn't work with the latest RSpec 1. I don't know when it broke but it's been untouched since 2007. So I'm cutting my losses there and making this one RSpec 2 only. I started with the version in the commit above and deleted things line by line to see what was no longer necessary. I also had to do some tweaking (the added RSpec 2 stuff featured some broad patterns that had to be tweaked and/or de-prioritized). I'm pushing the result. Let me know if you have issues with it.

Thanks!

@tpope tpope closed this Aug 23, 2011
@tpope tpope added a commit that closed this pull request Aug 23, 2011
@tpope tpope Switch compiler to RSpec 2
Closes #16
b01237d
@tpope tpope closed this in b01237d Aug 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.