Skip to content

Commit

Permalink
Correct guidance on where to put partial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nhorton authored Jan 1, 2024
1 parent dfc6adc commit eaef1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ Testing View Partials

Partial templates - usually called "partials" - are another device for breaking the rendering process into more manageable chunks. With partials, you can extract pieces of code from your templates to separate files and reuse them throughout your templates.

View tests provide an opportunity to test that partials render content the way you expect. View partial tests reside in `test/views/` and inherit from `ActionView::TestCase`.
View tests provide an opportunity to test that partials render content the way you expect. View partial tests reside in `test/controllers/` and inherit from `ActionView::TestCase`.

To render a partial, call `render` like you would in a template. The content is
available through the test-local `#rendered` method:
Expand Down

0 comments on commit eaef1cc

Please sign in to comment.