Repository: rails/rails
File: actionview/lib/action_view/test_case.rb (Ruby)

Code before:
        @params = ActionController::Parameters.new
      end
    end

    module Behavior
      extend ActiveSupport::Concern

      include ActionDispatch::Assertions, ActionDispatch::TestProcess
      include Rails::Dom::Testing::Assertions
      include ActionController::TemplateAssertions
      include ActionView::Context

      include ActionDispatch::Routing::PolymorphicRoutes

      include AbstractController::Helpers
      include ActionView::Helpers
      include ActionView::RecordIdentifier
      include ActionView::RoutingUrlFor

      include ActiveSupport::Testing::ConstantLookup

      delegate :lookup_context, to: :controller
      attr_accessor :controller, :request, :output_buffer

      ##
      # :method: rendered
      #
      # Returns the content rendered by the last +render+ call.
      #
      # The returned object behaves like a string but also exposes a number of methods
      # that allows you to parse the content string in formats registered using
      # <tt>.register_parser</tt>.
      #
      # By default includes the following parsers:
      #
      # +.html+
      #
      # Parse the <tt>rendered</tt> content String into HTML. By default, this means
      # a <tt>Nokogiri::XML::Node</tt>.
      #
      #   test "renders HTML" do
      #     article = Article.create!(title: "Hello, world")
      #
      #     render partial: "articles/article", locals: { article: article }
      #
      #     assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } }
      #   end
      #
      # To parse the rendered content into a <tt>Capybara::Simple::Node</tt>,
      # re-register an <tt>:html</tt> parser with a call to
      # <tt>Capybara.string</tt>:

Review comment (suggestion):
Since the `attr_accessor` is public anyways I think it makes sense to document it directly. We should be able to remove the 

```
##
# :method: rendered`
#
```

part as well

Code after:
        @params = ActionController::Parameters.new
      end
    end

    module Behavior
      extend ActiveSupport::Concern

      include ActionDispatch::Assertions, ActionDispatch::TestProcess
      include Rails::Dom::Testing::Assertions
      include ActionController::TemplateAssertions
      include ActionView::Context

      include ActionDispatch::Routing::PolymorphicRoutes

      include AbstractController::Helpers
      include ActionView::Helpers
      include ActionView::RecordIdentifier
      include ActionView::RoutingUrlFor

      include ActiveSupport::Testing::ConstantLookup

      delegate :lookup_context, to: :controller
      attr_accessor :controller, :request, :output_buffer

      # Returns the content rendered by the last +render+ call.
      #
      # The returned object behaves like a string but also exposes a number of methods
      # that allows you to parse the content string in formats registered using
      # <tt>.register_parser</tt>.
      #
      # By default includes the following parsers:
      #
      # +.html+
      #
      # Parse the <tt>rendered</tt> content String into HTML. By default, this means
      # a <tt>Nokogiri::XML::Node</tt>.
      #
      #   test "renders HTML" do
      #     article = Article.create!(title: "Hello, world")
      #
      #     render partial: "articles/article", locals: { article: article }
      #
      #     assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } }
      #   end
      #
      # To parse the rendered content into a <tt>Capybara::Simple::Node</tt>,
      # re-register an <tt>:html</tt> parser with a call to
      # <tt>Capybara.string</tt>:
      #
      #   register_parser :html, -> rendered { Capybara.string(rendered) }
      #