Sha256: fbe1f744d2c503f4e81f059c21bcd8ac77fb74f3c5b0c40ac89923a666bba907
Contents?: true
Size: 943 Bytes
Versions: 3
Compression:
Stored size: 943 Bytes
Contents
require 'spec_helper' describe LintTrap::Linter::JSONLint 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::JSON.new])} its(:version){is_expected.to eq('0.0.4')} its(:image){is_expected.to eq('lintci/jsonlint')} its(:image_version){is_expected.to eq('lintci/jsonlint:0.0.4')} describe '#lint' do it 'runs the lint command with the correct arguments' do expect(LintTrap::Command).to receive(:new).with( 'durable-json-lint', ['--format', '{{file}}:{{line}}:{{column}}:::error:{{{description}}}'], files ).and_return(command) expect(command).to receive(:run).with(container).and_return(true) linter.lint(files, container, options) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lint_trap-0.0.15 | spec/linter/jsonlint_spec.rb |
lint_trap-0.0.14 | spec/linter/jsonlint_spec.rb |
lint_trap-0.0.13 | spec/linter/jsonlint_spec.rb |