diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2012-05-21 15:24:18 -0400 |
---|---|---|
committer | Steve Klabnik <steve@steveklabnik.com> | 2012-08-28 21:06:58 -0700 |
commit | 728e925735d6532d1acd586f9dde30c499f91344 (patch) | |
tree | 9cb2cd77a04211048636455c136cbfb6e0c08e0a /actionpack/lib/action_dispatch | |
parent | 58d35f62110d4280818d49f6a76b3bdaa1ee217a (diff) | |
download | rails-728e925735d6532d1acd586f9dde30c499f91344.tar.gz rails-728e925735d6532d1acd586f9dde30c499f91344.tar.bz2 rails-728e925735d6532d1acd586f9dde30c499f91344.zip |
Fix bug when Rails.application is defined but is nil. See #881
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index 7280e9a93b..cf789dc901 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -12,7 +12,7 @@ module ActionDispatch end def initialize(env = {}) - env = Rails.application.env_config.merge(env) if defined?(Rails.application) + env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application super(DEFAULT_ENV.merge(env)) self.host = 'test.host' |