From 7e7e19132d2206831b824039a362aa378a4ef70e Mon Sep 17 00:00:00 2001 From: Timm Date: Thu, 25 Jul 2013 20:04:27 +0200 Subject: Added NodeSet comparison to possible root element in determine_root_from. --- actionpack/lib/action_dispatch/testing/assertions/selector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/testing') diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index 53e7675f7c..9b03ccce14 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -367,7 +367,7 @@ module ActionDispatch @css_selector_is_second_argument = false if root_or_selector == nil raise ArgumentError, "First argument is either selector or element to select, but nil found. Perhaps you called assert_select with an element that does not exist?" - elsif root_or_selector.is_a?(Nokogiri::XML::Node) + elsif root_or_selector.is_a?(Nokogiri::XML::Node) || root_or_selector.is_a?(Nokogiri::XML::NodeSet) # First argument is a node (tag or text, but also HTML root), # so we know what we're selecting from. @css_selector_is_second_argument = true -- cgit v1.2.3