Fix button matching regexp

This commit is contained in:
Bryan Helmkamp 2008-04-07 22:07:50 -04:00
parent 118cf0340a
commit a99d785ea0

View File

@ -102,7 +102,7 @@ module Webrat
class ButtonField < Field class ButtonField < Field
def matches_value?(value) def matches_value?(value)
@element["value"] =~ /^\W*#{Regexp.escape(value.to_s)}\b*/i @element["value"] =~ /^\W*#{Regexp.escape(value.to_s)}/i
end end
def to_param def to_param