Sha256: a4a654aca33e8e140d921daa04a9836861b44d203ab0089aabb88496da3006d5

Contents?: true

Size: 652 Bytes

Versions: 2

Compression:

Stored size: 652 Bytes

Contents

require 'spec_helper'

describe LintTrap::Parsers::VimQuickfixParser do
  let(:parser_output) do
    "bad.go:5:1: exported function Main should have comment or be unexported\n"
  end
  let(:io){StringIO.new(parser_output)}
  subject(:parser){described_class}

  describe '.parse' do
    it 'parses violations from io' do
      expect{|b| parser.parse(io, &b)}.to yield_successive_args(
        {
          file: 'bad.go',
          line: '5',
          column: '1',
          length: nil,
          rule: nil,
          severity: nil,
          message: 'exported function Main should have comment or be unexported'
        }
      )
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lint_trap-0.0.2 spec/parsers/vim_quickfix_parser_spec.rb
lint_trap-0.0.1 spec/parsers/vim_quickfix_parser_spec.rb