Skip to content

Commit

Permalink
Fix error when running a single test
Browse files Browse the repository at this point in the history
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 `<top (required)>': undefined method `config' for I18n::Coverage:Module (NoMethodError)
  • Loading branch information
Ben Thorner committed May 19, 2021
1 parent 00da299 commit a1c5802
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1c5802

Please sign in to comment.