mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add missing include to engine test example [ci skip]
Using url helper method of engine in example code, include `Engine.routes.url_helpers` is required to use helper method of engine.
This commit is contained in:
parent
3be9a34e78
commit
924f33ad96
1 changed files with 4 additions and 0 deletions
|
@ -1034,6 +1034,8 @@ typical `GET` to a controller in a controller's functional test like this:
|
|||
```ruby
|
||||
module Blorgh
|
||||
class FooControllerTest < ActionDispatch::IntegrationTest
|
||||
include Engine.routes.url_helpers
|
||||
|
||||
def test_index
|
||||
get foos_url
|
||||
...
|
||||
|
@ -1050,6 +1052,8 @@ in your setup code:
|
|||
```ruby
|
||||
module Blorgh
|
||||
class FooControllerTest < ActionDispatch::IntegrationTest
|
||||
include Engine.routes.url_helpers
|
||||
|
||||
setup do
|
||||
@routes = Engine.routes
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue