Skip to content

Commit 8fd0ebd

Browse files
committed
[rb] guards should match false not nil
1 parent 25efb72 commit 8fd0ebd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rb/lib/selenium/webdriver/support/guards.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ def initialize(example, bug_tracker: '', conditions: nil)
3737
@messages = {}
3838
end
3939

40-
def add_condition(name, condition = nil, &block)
40+
def add_condition(name, condition = false, &block)
41+
condition = false if condition.nil?
4142
@guard_conditions << GuardCondition.new(name, condition, &block)
42-
WebDriver.logger.info "Running with Guard '#{name}' set to: #{!!condition}"
43+
WebDriver.logger.info "Running with Guard '#{name}' set to: #{condition}"
4344
end
4445

4546
def add_message(name, message)

0 commit comments

Comments
 (0)