Permalink
Browse files

Add support for RSpec 3.4 to compiler

RSpec 3.4 introduced a small change to its failure messages. Given the
following spec file:

    RSpec.describe "blah" do
      it "definitely does not raise hell" do
        raise "hell"
      end
    end

RSpec 3.3 outputs:

    blah
      definitely does not raise hell (FAILED - 1)

    Failures:

      1) blah definitely does not raise hell
        Failure/Error: raise "hell"
        RuntimeError:
          hell
        # ./blah_spec.rb:3:in `block (2 levels) in <top (required)>'
    <snip>

RSpec 3.4 outputs:

    blah
      definitely does not raise hell (FAILED - 1)

    Failures:

      1) blah definitely does not raise hell
        Failure/Error: raise "hell"

        RuntimeError:
          hell
        # ./blah_spec.rb:3:in `block (2 levels) in <top (required)>'
    <snip>

This change adds a multi-line continuation rule to the RSpec compiler allowing
it to ignore empty lines in multi-line error messages.
  • Loading branch information...
1 parent 5b526fa commit d7d93c14f1baf85a7895c1885d5cad44652648e5 @urbanautomaton urbanautomaton committed Dec 10, 2015
Showing with 1 addition and 0 deletions.
  1. +1 −0 compiler/rspec.vim
View
@@ -25,6 +25,7 @@ CompilerSet errorformat=
\%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#,
\%E\ \ %\\d%\\+)%.%#,
\%C\ \ \ \ \ %m,
+ \%C%\\s%#,
\%-G%.%#
let &cpo = s:cpo_save

0 comments on commit d7d93c1

Please sign in to comment.