Created
August 17, 2009 16:12
-
-
Save phinze/169215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Loosen webrat's field label matching regexp | |
module Webrat | |
module Locators | |
class FieldLabeledLocator < Locator | |
def matching_label_elements_with_numbering | |
label_elements.select do |label_element| | |
text(label_element) =~ /^.*#{Regexp.escape(@value.to_s)}.*$/i | |
end | |
end | |
alias_method_chain :matching_label_elements, :numbering | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment