Sha256: 42f488278a3bd2dfc98d5979c3447702dddabe17b9e7b947539e83bc1f5bd6e8

Contents?: true

Size: 645 Bytes

Versions: 3

Compression:

Stored size: 645 Bytes

Contents

require "spec_helper"

module CodeAnalyzer::CheckingVisitor
  describe Plain do
    let(:checker1) { double(:checker) }
    let(:checker2) { double(:checker) }
    let(:visitor) { Plain.new(checkers: [checker1, checker2]) }

    it "should check by all checkers" do
      filename = "filename"
      content = "content"
      expect(checker1).to receive(:parse_file?).and_return(false)
      expect(checker2).to receive(:parse_file?).and_return(true)
      expect(checker1).not_to receive(:check).with(filename, content)
      expect(checker2).to receive(:check).with(filename, content)

      visitor.check(filename, content)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
code_analyzer-0.4.8 spec/code_analyzer/checking_visitor/plain_spec.rb
code_analyzer-0.4.7 spec/code_analyzer/checking_visitor/plain_spec.rb
code_analyzer-0.4.6 spec/code_analyzer/checking_visitor/plain_spec.rb