Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup the xpath expression

  • Loading branch information...
commit 628f6a9d5f795fdf056215eb25e2cecbee0fe54b 1 parent cb7a483
@twalpole authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/capybara/node/matchers.rb
View
4 lib/capybara/node/matchers.rb
@@ -181,7 +181,7 @@ def has_no_css?(path, options={})
# @return [Boolean] Whether it exists
#
def has_content?(content)
- has_xpath?(XPath::HTML.content(content).where(:"count(#{XPath.child[XPath.current.n.contains(content)].to_xpath})=0"))
+ has_xpath?(XPath::HTML.content(content).where(~XPath.child[XPath.current.n.contains(content)]))
end
##
@@ -193,7 +193,7 @@ def has_content?(content)
# @return [Boolean] Whether it exists
#
def has_no_content?(content)
- has_no_xpath?(XPath::HTML.content(content).where(:"count(#{XPath.child[XPath.current.n.contains(content)].to_xpath})=0") )
+ has_no_xpath?(XPath::HTML.content(content).where(~XPath.child[XPath.current.n.contains(content)]))
end
##
Please sign in to comment.
Something went wrong with that request. Please try again.