@@ -184,17 +184,17 @@ In addition to [the matchers that come standard in RSpec][],
184
184
here are some extras that make it easier
185
185
to test the various parts of a Rails system:
186
186
187
- | RSpec matcher | Delegates to | Available in | Notes |
188
- | ------------------------ | ----------------- | ------------------------------- | -------------------------------------------------------- |
189
- | [ ` be_a_new ` ] [ ] | | all | primarily intended for controller specs |
190
- | [ ` render_template ` ] [ ] | ` assert_template ` | request / controller / view | use with ` expect(response).to ` |
191
- | [ ` redirect_to ` ] [ ] | ` assert_redirect ` | request / controller | use with ` expect(response).to ` |
192
- | [ ` route_to ` ] | ` assert_routing ` | routing / controller | use with ` expect(...).to route_to ` |
193
- | [ ` be_routable ` ] | | routing / controller | use with ` expect(...).not_to be_routable ` |
194
- | [ ` have_http_status ` ] [ ] | | request / controller / feature | |
195
- | [ ` match_array ` ] [ ] | | all | for comparing arrays of ActiveRecord objects |
196
- | [ ` have_been_enqueued ` ] [ ] | | all | requires config: ` ActiveJob::Base.queue_adapter = :test ` |
197
- | [ ` have_enqueued_job ` ] [ ] | | all | requires config: ` ActiveJob::Base.queue_adapter = :test ` |
187
+ | RSpec matcher | Delegates to | Available in | Notes |
188
+ | ------------------------ | ------------------- | ------------------------------- | -------------------------------------------------------- |
189
+ | [ ` be_a_new ` ] [ ] | | all | primarily intended for controller specs |
190
+ | [ ` render_template ` ] [ ] | ` assert_template ` | request / controller / view | use with ` expect(response).to ` |
191
+ | [ ` redirect_to ` ] [ ] | ` assert_redirect ` | request / controller | use with ` expect(response).to ` |
192
+ | [ ` route_to ` ] | ` assert_recognizes ` | routing / controller | use with ` expect(...).to route_to ` |
193
+ | [ ` be_routable ` ] | | routing / controller | use with ` expect(...).not_to be_routable ` |
194
+ | [ ` have_http_status ` ] [ ] | | request / controller / feature | |
195
+ | [ ` match_array ` ] [ ] | | all | for comparing arrays of ActiveRecord objects |
196
+ | [ ` have_been_enqueued ` ] [ ] | | all | requires config: ` ActiveJob::Base.queue_adapter = :test ` |
197
+ | [ ` have_enqueued_job ` ] [ ] | | all | requires config: ` ActiveJob::Base.queue_adapter = :test ` |
198
198
199
199
Follow the links above for examples of how each matcher is used.
200
200
0 commit comments