Skip to content

Commit 199aaee

Browse files
committed
[rb] when test is guarded just output the whole matching guard
1 parent 40da1a7 commit 199aaee

File tree

1 file changed

+2
-4
lines changed
  • rb/lib/selenium/webdriver/support/guards

1 file changed

+2
-4
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def initialize(guarded, type, guards = nil)
3636
@messages[:unknown] = 'TODO: Investigate why this is failing and file a bug report'
3737
@type = type
3838

39-
@reason = @guarded[:reason]
39+
@guarded[:reason] ||= 'No reason given'
4040
end
4141

4242
def message
@@ -45,10 +45,8 @@ def message
4545
"Bug Filed: #{@tracker}/#{@reason}"
4646
when Symbol
4747
@messages[@reason]
48-
when String
49-
@reason
5048
else
51-
'no reason given'
49+
"Guarded by #{guarded};"
5250
end
5351

5452
case @type

0 commit comments

Comments
 (0)