1
0
Fork 0
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:
yuuji.yaginuma 2016-02-05 13:09:23 +09:00
parent 3be9a34e78
commit 924f33ad96

View file

@ -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