Sha256: ca00e776c4614f87b9bbed80ec417f1c15215d82f492d030ad6132ddf50f64bb

Contents?: true

Size: 681 Bytes

Versions: 3

Compression:

Stored size: 681 Bytes

Contents

require 'spec_helper'

describe LintTrap::Linter::GoLint do
  let(:container){LintTrap::Container::Fake.new}
  let(:options){{}}
  let(:files){%w(good.go bad.go)}
  subject(:linter){described_class.new}
  let(:command){instance_double(LintTrap::Command)}

  it_behaves_like 'linter'

  its(:languages){is_expected.to eq([LintTrap::Language::Go.new])}

  describe '#lint' do
    it 'runs the lint command with the correct arguments' do
      expect(LintTrap::Command).to receive(:new).with(
        'golint',
        [],
        files
      ).and_return(command)
      expect(command).to receive(:run).with(container)

      linter.lint(files, container, options)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lint_trap-0.0.11 spec/linter/golint_spec.rb
lint_trap-0.0.10 spec/linter/golint_spec.rb
lint_trap-0.0.9 spec/linter/golint_spec.rb