From c6cd6acad3a67109f8b0bcbb80a6302bef61183f Mon Sep 17 00:00:00 2001 From: Jonas Nicklas Date: Fri, 15 Feb 2013 22:14:07 +0100 Subject: [PATCH] Fix basics nodes --- lib/capybara/node/simple.rb | 7 ++++--- spec/basic_node_spec.rb | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/capybara/node/simple.rb b/lib/capybara/node/simple.rb index 5049893de..a5e250698 100644 --- a/lib/capybara/node/simple.rb +++ b/lib/capybara/node/simple.rb @@ -130,9 +130,10 @@ def unsynchronized yield # simple nodes don't need to wait end - def all(*args) - query = Capybara::Query.new(*args) - elements = native.xpath(query.xpath).map do |node| + private + + def resolve_query(query, exact=nil) + elements = native.xpath(query.xpath(exact)).map do |node| self.class.new(node) end Capybara::Result.new(elements, query) diff --git a/spec/basic_node_spec.rb b/spec/basic_node_spec.rb index 8b65ba003..0ace354de 100644 --- a/spec/basic_node_spec.rb +++ b/spec/basic_node_spec.rb @@ -10,7 +10,7 @@

Yes it is

-