-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix overriding ActionController::Live with test_behaviour when not test mode. #183
Conversation
4 similar comments
@gurix sorry for the very late reply If this is the best solution at the moment, we will go for it Please give me a couple of days |
@gurix a couple of questions:
I can see that in production environment
|
@tagliala Thanks for your response.
As I wrote, i am not very happy with this solution as it is somehow a rails problem done by @tenderlove two years ago. But it is the best fix for the moment. I also wrote him but had no answer til now. |
@gurix thanks I'm not going to merge this PR because I was working on another branch and I've cherry-picked your commit |
5.6.1 released Don't worry about the Travis.CI failure, it is because of a rails 5.2 issue with Ruby 2.2.10 |
Cool, I just updated my broken App with version 5.6.2 and now everything is working fine. Now I can bump my production site to rails 5.1. 🎉💃🏻Thanks for your support. |
Including ActionController::TestCase::Behavior overrides
ActionController::Live#new_controller_thread
as discussed on rails/rails#31200. This issue also affects any production mode as the include is not done just in test mode.This pull request separates production code from test code by query the environment. I am not satisfied by this solution. In the future we should think about separating even more by monkey patching in tests only.