diff --git a/README.md b/README.md index bbd3c26..8925458 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ AppProfiler.storage.credentials = { "key" => "value" } Rails.application.config.app_profiler.storage_credentials = { "key" => "value" } ``` -Note that in `development` mode the file isn't uploaded. Instead, it is viewed via the `Middleware::ViewAction`. If you want to change that, use the `middleware_action` configuration: +Note that in `development` and `test` modes the file isn't uploaded. Instead, it is viewed via the `Middleware::ViewAction`. If you want to change that, use the `middleware_action` configuration: ```ruby Rails.application.config.app_profiler.middleware_action = AppProfiler::Middleware::UploadAction diff --git a/lib/app_profiler/railtie.rb b/lib/app_profiler/railtie.rb index febce88..98ad041 100644 --- a/lib/app_profiler/railtie.rb +++ b/lib/app_profiler/railtie.rb @@ -63,7 +63,7 @@ class Railtie < Rails::Railtie private def default_middleware_action - if Rails.env.development? + if Rails.env.development? || Rails.env.test? Middleware::ViewAction else Middleware::UploadAction