Sha256: 62a8cfbf95b0941b4fa96f52a667e80e24abcab5c01845aa8e9ec2bee8384b05

Contents?: true

Size: 598 Bytes

Versions: 2

Compression:

Stored size: 598 Bytes

Contents

require 'spec_helper'

describe LintTrap do
  it 'has a version number' do
    expect(LintTrap::VERSION).not_to be nil
  end

  describe '.parse' do
    let(:io){StringIO.new("bad.rb:2:7:4:Style/MethodName:convention:Use snake_case for methods.\n")}

    it 'yields the expected violations' do
      expect{|b| LintTrap.parse('rubocop', io, &b)}.to yield_successive_args({
        file: 'bad.rb',
        line: '2',
        column: '7',
        length: '4',
        rule: 'Style/MethodName',
        severity: 'convention',
        message: 'Use snake_case for methods.'
      })
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lint_trap-0.0.2 spec/lint_trap_spec.rb
lint_trap-0.0.1 spec/lint_trap_spec.rb