diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index e551851ed6..c2a5d59577 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -374,12 +374,11 @@ module ActionDispatch root_or_selector elsif @selected - # nested call - wrap in document if @selected.is_a?(Array) doc = @selected.empty? ? @page.document : @selected[0].document @selected = Nokogiri::XML::NodeSet.new(doc, @selected) end - Loofah.fragment('').tap { |d| d.add_child @selected } + @selected else @page end |