class Selenium::WebDriver::Support::Guards::Guard
def except?
def except? @type == :except end
def exclude?
def exclude? @type == :exclude end
def exclusive?
def exclusive? @type == :exclusive end
def initialize(guarded, type, guards = nil)
def initialize(guarded, type, guards = nil) @guarded = guarded @tracker = guards&.bug_tracker || '' @messages = guards&.messages || {} @messages[:unknown] = 'TODO: Investigate why this is failing and file a bug report' @type = type @reason = @guarded.delete(:reason) end
def message
def message details = case @reason when Integer "Bug Filed: #{@tracker}/#{@reason}" when Symbol @messages[@reason] when String @reason else 'no reason given' end case @type when :exclude "Test not guarded because it breaks test run; #{details}" when :exclusive "Test does not apply to this configuration; #{details}" else "Test guarded; #{details}" end end
def only?
def only? @type == :only end