This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Monkey patch for ActionController::TestRequest to automatically enable sessions | |
| # with Rails-configured session store (e.g., memcached) in tests | |
| # | |
| # Place this in: test/support/action_controller_test_request_patch.rb | |
| # Then require it in test/test_helper.rb | |
| # | |
| # Usage: | |
| # request = ActionController::TestRequest.create | |
| # # or with initial session data: | |
| # request = ActionController::TestRequest.create({}, { user_id: 123, foo: 'bar' }) |