-
Notifications
You must be signed in to change notification settings - Fork 756
Only include React::Rails::TestHelper in test environment #996
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
Only include React::Rails::TestHelper in test environment #996
Conversation
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.
+1, this fixed my problem
Thank you for confirming this does not occur in the 2.4 branch, that helps me know there is no backport needed. |
@BookOfGreg Can this be merged soon so we can use it? Thanks! |
I need the ChromeDriver fix first. #1004 |
@Aesthetikx @pcarn I re-ran the tests with master merged (#1005 , Finished work on #1004 ) and tests passed there. Released in 2.6.0 |
Noting here for posterity and search crawlers that this was a breaking change for us, causing a NoMethodError We were able to just remove csrf protection on our API controllers to get around the failure as I am under the impression that csrf is not needed for APIs. I consider this to be a problem with Rails though. It is not reasonable to expect this change to have caused that error. |
this commit removes some direct access to `env`.
Based on this discussion in the rails repository I determined that the latest version of
react-rails
(2.5.0, not present in 2.4.7) inadvertently causesaction_controller/test_case
to be required, which breaksActionController::Live
streaming in development and presumably production environments.This change only includes
React::Rails::TestHelper
in the test environment.