Sha256: 57b0bf69bc517336d1583913c04a4a9f862b403978a4e20069dae91a8825e6ee
Contents?: true
Size: 704 Bytes
Versions: 155
Compression:
Stored size: 704 Bytes
Contents
module Axe class AccessibleExpectation def assert(page, matcher) raise matcher.failure_message unless matcher.matches? page end end class InaccessibleExpectation def assert(page, matcher) raise matcher.failure_message_when_negated if matcher.matches? page end end class AccessibilityExpectation def self.create(negate) negate ? InaccessibleExpectation.new : AccessibleExpectation.new end def initialize(page) @page = page end def to(matcher) AccessibleExpectation.new.assert @page, matcher end def to_not(matcher) InaccessibleExpectation.new.assert @page, matcher end alias :not_to :to_not end end
Version data entries
155 entries across 155 versions & 1 rubygems