From 95a398d91b5c8e2e9a6ec2225f781d06511d7eeb Mon Sep 17 00:00:00 2001 From: fatkodima Date: Tue, 22 Oct 2024 12:44:08 +0300 Subject: [PATCH] Load trackers for `clear_tracker` rake task --- lib/coverband/utils/tasks.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/coverband/utils/tasks.rb b/lib/coverband/utils/tasks.rb index ef7d1323..7b74eea7 100644 --- a/lib/coverband/utils/tasks.rb +++ b/lib/coverband/utils/tasks.rb @@ -141,6 +141,9 @@ ### desc "reset Coverband trackers data (view, routes, translations, etc), helpful for development, debugging, etc" task :clear_tracker do + # Load rails-related trackers, if the gem is used in a rails app. + Coverband.configuration.railtie! if defined?(Rails::Railtie) + trackers = Coverband.configuration.trackers trackers.each(&:reset_recordings) end