Skip to content

Commit

Permalink
Merge pull request #2418 from meshulam/patch-1
Browse files Browse the repository at this point in the history
Correct route_to documentation in README
  • Loading branch information
JonRowe committed Dec 26, 2020
1 parent 84ff1ef commit 5789131
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,17 @@ In addition to [the matchers that come standard in RSpec][],
here are some extras that make it easier
to test the various parts of a Rails system:

| RSpec matcher | Delegates to | Available in | Notes |
| ------------------------ | ----------------- | ------------------------------- | -------------------------------------------------------- |
| [`be_a_new`][] | | all | primarily intended for controller specs |
| [`render_template`][] | `assert_template` | request / controller / view | use with `expect(response).to` |
| [`redirect_to`][] | `assert_redirect` | request / controller | use with `expect(response).to` |
| [`route_to`] | `assert_routing` | routing / controller | use with `expect(...).to route_to` |
| [`be_routable`] | | routing / controller | use with `expect(...).not_to be_routable` |
| [`have_http_status`][] | | request / controller / feature | |
| [`match_array`][] | | all | for comparing arrays of ActiveRecord objects |
| [`have_been_enqueued`][] | | all | requires config: `ActiveJob::Base.queue_adapter = :test` |
| [`have_enqueued_job`][] | | all | requires config: `ActiveJob::Base.queue_adapter = :test` |
| RSpec matcher | Delegates to | Available in | Notes |
| ------------------------ | ------------------- | ------------------------------- | -------------------------------------------------------- |
| [`be_a_new`][] | | all | primarily intended for controller specs |
| [`render_template`][] | `assert_template` | request / controller / view | use with `expect(response).to` |
| [`redirect_to`][] | `assert_redirect` | request / controller | use with `expect(response).to` |
| [`route_to`] | `assert_recognizes` | routing / controller | use with `expect(...).to route_to` |
| [`be_routable`] | | routing / controller | use with `expect(...).not_to be_routable` |
| [`have_http_status`][] | | request / controller / feature | |
| [`match_array`][] | | all | for comparing arrays of ActiveRecord objects |
| [`have_been_enqueued`][] | | all | requires config: `ActiveJob::Base.queue_adapter = :test` |
| [`have_enqueued_job`][] | | all | requires config: `ActiveJob::Base.queue_adapter = :test` |

Follow the links above for examples of how each matcher is used.

Expand Down

0 comments on commit 5789131

Please sign in to comment.