Sha256: 862c84ab2fb66349550338f2d625533e426eaa31c59965a9143f57ce14f3be96

Contents?: true

Size: 613 Bytes

Versions: 12

Compression:

Stored size: 613 Bytes

Contents

module SiteValidator
  class MockedValidator
    attr_accessor :errors, :warnings

    def initialize
      @errors, @warnings = [], []
    end

    def add_error(message_id, line, col, message, source, explanation)
      @errors << SiteValidator::MockedMessage.new(message_id, line, col, message, source, explanation)
    end

    def add_warning(message_id, line, col, message, source, explanation)
      @warnings << SiteValidator::MockedMessage.new(message_id, line, col, message, source, explanation)
    end
  end

  MockedMessage = Struct.new(:message_id, :line, :col, :message, :source, :explanation)
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
site_validator-1.3.10 spec/mocks/mocked_validator.rb
site_validator-1.3.9 spec/mocks/mocked_validator.rb
site_validator-1.3.8 spec/mocks/mocked_validator.rb
site_validator-1.3.7 spec/mocks/mocked_validator.rb
site_validator-1.3.6 spec/mocks/mocked_validator.rb
site_validator-1.3.5 spec/mocks/mocked_validator.rb
site_validator-1.3.4 spec/mocks/mocked_validator.rb
site_validator-1.3.3 spec/mocks/mocked_validator.rb
site_validator-1.3.2 spec/mocks/mocked_validator.rb
site_validator-1.3.1 spec/mocks/mocked_validator.rb
site_validator-1.3.0 spec/mocks/mocked_validator.rb
site_validator-1.2.5 spec/mocks/mocked_validator.rb