mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Replace regexp with include? ... more readable
This commit is contained in:
parent
4363452f6d
commit
e71d66b791
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ module Capybara
|
||||||
end
|
end
|
||||||
|
|
||||||
def sanitized_xpath_string(string)
|
def sanitized_xpath_string(string)
|
||||||
if string =~ /'/
|
if string.include?("'")
|
||||||
string = string.split("'", -1).map do |substr|
|
string = string.split("'", -1).map do |substr|
|
||||||
"'#{substr}'"
|
"'#{substr}'"
|
||||||
end.join(%q{,"'",})
|
end.join(%q{,"'",})
|
||||||
|
|
Loading…
Reference in a new issue