Sha256: 7bf193c6a59a1bf6540871819be26774efd6947a00ba76ab66708e904a4ea0ea
Contents?: true
Size: 1017 Bytes
Versions: 4
Compression:
Stored size: 1017 Bytes
Contents
require 'spec_helper' describe LintTrap::Linter::CPPCheck do let(:container){LintTrap::Container::Fake.new} let(:options){{}} let(:files){%w(good.cpp bad.cpp)} subject(:linter){LintTrap::Linter.find('CPPCheck')} let(:command){instance_double(LintTrap::Command)} it_behaves_like 'linter' its(:languages){is_expected.to eq([LintTrap::Language::CPP.new])} its(:version){is_expected.to eq('1.67-1')} its(:image){is_expected.to eq('lintci/cppcheck')} its(:image_version){is_expected.to eq('lintci/cppcheck:1.67-1')} describe '#lint' do it 'runs the lint command with the correct arguments' do expect(LintTrap::Command).to receive(:new).with( 'cppcheck', [ '--enable=all', '--error-exitcode=1', '--template="{file}:{line}:::{id}:{severity}:{message}"' ], 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lint_trap-0.0.19 | spec/linter/cppcheck_spec.rb |
lint_trap-0.0.18 | spec/linter/cppcheck_spec.rb |
lint_trap-0.0.17 | spec/linter/cppcheck_spec.rb |
lint_trap-0.0.16 | spec/linter/cppcheck_spec.rb |