rspec-rails

https://github.com/rspec/rspec-rails

Ruby

RSpec for Rails 5+

RSpec::Rails::ViewExampleGroup::ExampleMethods#render

Delegates to ActionView::Base#render, so see documentation on that
for more info.

The only addition is that you can call render with no arguments, and
RSpec will pass the top level description to render:

    describe "widgets/new.html.erb" do
      it "shows all the widgets" do
        render # => view.render(:file => "widgets/new.html.erb")
        # ...
      end
    end

Source | Google | Stack overflow

Edit

git clone [email protected]:rspec/rspec-rails.git

cd rspec-rails

open lib/rspec/rails/example/view_example_group.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RSpec--Rails--ViewExampleGroup--ExampleMethods-render-for-pr


# Commit to git

git add lib/rspec/rails/example/view_example_group.rbgit commit -m "better docs for RSpec::Rails::ViewExampleGroup::ExampleMethods#render"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-RSpec--Rails--ViewExampleGroup--ExampleMethods-render-for-pr

hub pull-request


# Celebrate!