mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
just assign regexps
This commit is contained in:
parent
866c975076
commit
2a0d50cb57
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ module Capybara
|
|||
options[:text]
|
||||
else
|
||||
if exact_text == true
|
||||
"\\A#{Regexp.escape(options[:text].to_s)}\\z"
|
||||
/\A#{Regexp.escape(options[:text].to_s)}\z/
|
||||
else
|
||||
Regexp.escape(options[:text].to_s)
|
||||
end
|
||||
|
@ -68,7 +68,7 @@ module Capybara
|
|||
end
|
||||
|
||||
if exact_text.is_a?(String)
|
||||
regexp = "\\A#{Regexp.escape(options[:exact_text])}\\z"
|
||||
regexp = /\A#{Regexp.escape(options[:exact_text])}\z/
|
||||
text_visible = visible
|
||||
text_visible = :all if text_visible == :hidden
|
||||
return false if not node.text(text_visible).match(regexp)
|
||||
|
|
Loading…
Reference in a new issue