diff --git a/config.ru b/config.ru index c713f67..a9e519f 100644 --- a/config.ru +++ b/config.ru @@ -4,11 +4,13 @@ require ::File.expand_path('config/environment', __dir__) -require 'prometheus/middleware/collector' -require 'prometheus/middleware/exporter' +unless Rails.env.test? + require 'prometheus/middleware/collector' + require 'prometheus/middleware/exporter' -use Prometheus::Middleware::Collector -use Prometheus::Middleware::Exporter + use Prometheus::Middleware::Collector + use Prometheus::Middleware::Exporter +end map Rails.application.config.relative_url_root || '/' do run Rails.application