lib/watirspec/guards.rb in watir-6.0.2 vs lib/watirspec/guards.rb in watir-6.0.3
- old
+ new
@@ -13,11 +13,11 @@
def report
gs = WatirSpec.implementation.matching_guards_in(guards)
print "\n\nWatirSpec guards for this implementation: "
if gs.empty?
- puts "none."
+ puts "none."
else
puts
gs.each do |guard|
puts "\t#{guard[:name].to_s.ljust(20)}: #{guard[:data].inspect}"
end
@@ -46,10 +46,10 @@
end
def bug(key, *impls)
Guards.record :bug, impls, file: caller.first, key: key
return yield if WatirSpec.unguarded?
- yield unless WatirSpec.implementation.matches_guard?(impls)
+ yield if impls.any? && !WatirSpec.implementation.matches_guard?(impls)
end
end
end
class Object