diff options
| author | Timm <kaspth@gmail.com> | 2013-07-31 19:48:35 +0200 |
|---|---|---|
| committer | Timm <kaspth@gmail.com> | 2014-06-16 21:03:59 +0200 |
| commit | f1031225f67fc3ee23b68c068f31d5099d00f11d (patch) | |
| tree | 1affed63ab5de5c047cfad7862232ee27c412f8c /actionpack/lib/action_dispatch/testing/assertions | |
| parent | a45ee9e5e394f1663bf6d96424f42a3e2a21af80 (diff) | |
| download | rails-f1031225f67fc3ee23b68c068f31d5099d00f11d.tar.gz rails-f1031225f67fc3ee23b68c068f31d5099d00f11d.tar.bz2 rails-f1031225f67fc3ee23b68c068f31d5099d00f11d.zip | |
Reverted to using documents instead of document fragments, since searching via default xml namespaces didn't work.
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
| -rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index 504eccd0a7..e551851ed6 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -296,12 +296,15 @@ module ActionDispatch # +html_document+ is used in testing/integration.rb def html_document @html_document ||= if @response.content_type =~ /xml$/ - Loofah.xml_fragment(@response.body) + Loofah.xml_document(@response.body) else - Loofah.fragment(@response.body) + Loofah.document(@response.body) end end - alias :response_from_page :html_document + + def response_from_page + html_document.root + end class HTMLSelector #:nodoc: attr_accessor :root, :css_selector, :comparisons, :message |
