You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
555 B

  1. # frozen_string_literal: true
  2. require 'i18n/tasks'
  3. RSpec.describe 'I18n' do
  4. let(:i18n) { I18n::Tasks::BaseTask.new }
  5. let(:missing_keys) { i18n.missing_keys }
  6. let(:unused_keys) { i18n.unused_keys }
  7. it 'does not have missing keys' do
  8. expect(missing_keys).to be_empty,
  9. "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
  10. end
  11. it 'does not have unused keys' do
  12. expect(unused_keys).to be_empty,
  13. "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
  14. end
  15. end