Sha256: bfc2e786fd1afd147406126060f254871567b9f34703996a6d42b907cd692291

Contents?: true

Size: 709 Bytes

Versions: 9

Compression:

Stored size: 709 Bytes

Contents

require 'spec_helper'

describe LintTrap::Parser::VimQuickfix 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)}
  let(:container){LintTrap::Container::Fake.new}
  subject(:parser){described_class.new(io, container)}

  describe '#parse' do
    it 'parses violations from io' do
      expect{|b| parser.parse(&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

9 entries across 9 versions & 1 rubygems

Version Path
lint_trap-0.0.11 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.10 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.9 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.8 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.7 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.6 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.5 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.4 spec/parser/vim_quickfix_spec.rb
lint_trap-0.0.3 spec/parser/vim_quickfix_spec.rb