diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-18 18:47:22 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-18 18:47:22 -0200 |
commit | 1b9e85dbbd7d974143e67affb3166d7244cc99db (patch) | |
tree | 66e446c1a6bf17c1873f34a97b404e92a232c67d /actionview/lib | |
parent | edc39ff756d09b746bdc1acb8d814c3148289846 (diff) | |
download | rails-1b9e85dbbd7d974143e67affb3166d7244cc99db.tar.gz rails-1b9e85dbbd7d974143e67affb3166d7244cc99db.tar.bz2 rails-1b9e85dbbd7d974143e67affb3166d7244cc99db.zip |
Make sure assert_select can assert body tag
This reverts commit f93df52845766216f0fe36a4586f8abad505cac4, reversing
changes made to a455e3f4e9dbfb9630d47878e1239bc424fb7d13.
Conflicts:
actionpack/lib/action_controller/test_case.rb
actionview/lib/action_view/test_case.rb
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/test_case.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 5cffddcd4f..812b011bd7 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -126,10 +126,6 @@ module ActionView end # Need to experiment if this priority is the best one: rendered => output_buffer - def document_root_element - Nokogiri::HTML::DocumentFragment.parse(@rendered.blank? ? @output_buffer : @rendered) - end - class RenderedViewsCollection def initialize @rendered_views ||= Hash.new { |hash, key| hash[key] = [] } @@ -161,6 +157,11 @@ module ActionView private + # Need to experiment if this priority is the best one: rendered => output_buffer + def document_root_element + Nokogiri::HTML::Document.parse(@rendered.blank? ? @output_buffer : @rendered).root + end + def say_no_to_protect_against_forgery! _helpers.module_eval do remove_possible_method :protect_against_forgery? |