ActionDispatch::TestRequest - Undefined method `env_config' when Rails.application is nil #881

Closed
lighthouse-import opened this Issue May 16, 2011 · 1 comment

Comments

Projects
None yet
1 participant
@lighthouse-import

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6492
Created by Josep M. Bach - 2011-03-01 15:14:04 UTC

When instantiating an ActionDispatch::TestRequest, it raises an undefined method error when Rails.application is nil. Although it checks for defined?(Rails.application), it fails to check whether the application is really present.

Included patch adds the additional check needed (with tests).

@lighthouse-import

This comment has been minimized.

Show comment
Hide comment

Attachments saved to Gist: http://gist.github.com/971790

carlosantoniodasilva added a commit that referenced this issue May 21, 2012

Merge pull request #6429 from marcandre/fix_test_request
Fix bug when Rails.application is defined but is nil. See #881

steveklabnik added a commit to steveklabnik/rails that referenced this issue Aug 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment