-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set engine's route in the functional test is generated in the engine #20387
set engine's route in the functional test is generated in the engine #20387
Conversation
@y-yagi this seems like a good idea. I'm wondering why we didn't notice that those tests are not working. I vaguely remember that we have some tests in railties that run generated test files. Could you explore to write such a test? |
@senny Thank you for the review! I added test to run generated test files. |
assert_match(/2 runs, 2 assertions, 0 failures, 0 errors/, `bundle exec rake test 2>&1`) | ||
end | ||
|
||
def test_generating_scaffold_controller_inside_mountable_engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this test? Looks like a duplication of the one following right after.
@senny Thank you for the review! |
@y-yagi fantastic. Thank you 💛 I added an entry to the changelog in the merge-commit. |
…_test set engine's route in the functional test is generated in the engine
…_test set engine's route in the functional test is generated in the engine Conflicts: railties/CHANGELOG.md
@senny Thanks! |
Currently, functional test is generated in the engine does not work properly.
In order to work properly, need to set the
@routes
instance variable to the engine's route.Therefore, I think good to have engine's route in the generated functional test is set.