Sha256: 72b9607ec3606c47c7dcb340d19bccb823c5d1f8399bcecd32c80c465d1b2df4

Contents?: true

Size: 663 Bytes

Versions: 13

Compression:

Stored size: 663 Bytes

Contents

module SiteValidator
  class MockedValidator
    attr_accessor :errors, :warnings

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

    def checked_by
      "w3c_validator"
    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

13 entries across 13 versions & 1 rubygems

Version Path
site_validator-2.1.2 spec/mocks/mocked_validator.rb
site_validator-2.1.1 spec/mocks/mocked_validator.rb
site_validator-2.1.0 spec/mocks/mocked_validator.rb
site_validator-2.0.0 spec/mocks/mocked_validator.rb
site_validator-1.7.4 spec/mocks/mocked_validator.rb
site_validator-1.7.3 spec/mocks/mocked_validator.rb
site_validator-1.7.2 spec/mocks/mocked_validator.rb
site_validator-1.7.1 spec/mocks/mocked_validator.rb
site_validator-1.7.0 spec/mocks/mocked_validator.rb
site_validator-1.6.0 spec/mocks/mocked_validator.rb
site_validator-1.5.0 spec/mocks/mocked_validator.rb
site_validator-1.4.1 spec/mocks/mocked_validator.rb
site_validator-1.3.11 spec/mocks/mocked_validator.rb