lib/watchdocs/rails/middleware.rb in watchdocs-rails-0.2.0 vs lib/watchdocs/rails/middleware.rb in watchdocs-rails-0.3.0

- old
+ new

@@ -59,10 +59,16 @@ rescue @report[:endpoint] = 'No routes match' end def record_call - Watchdocs::Rails::Recordings.record_call(report) + Rails::Recordings.record( + report, from_specs: from_specs? + ) + end + + def from_specs? + ::Rails.env.test? end def request_headers(env) env.keys .select { |k| k.start_with? 'HTTP_' }