From a1c5802f134755e5f5708746f5ad847c1d4b5ca8 Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Wed, 19 May 2021 17:49:02 +0100 Subject: [PATCH] Fix error when running a single test The require statement for the printer doesn't replace the general one for the module. It's actually unclear how this worked without it, but I don't think that's worth investigating. Error, for reference: /govuk/government-frontend/test/test_helper.rb:10:in `': undefined method `config' for I18n::Coverage:Module (NoMethodError) --- test/test_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index 39612b16a..ffac52fc5 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -6,6 +6,7 @@ require "simplecov" SimpleCov.start +require "i18n/coverage" require "i18n/coverage/printers/file_printer" I18n::Coverage.config.printer = I18n::Coverage::Printers::FilePrinter I18n::Coverage.start