-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supports the same tests as rspec template
- Loading branch information
1 parent
ca08e29
commit 2a07309
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'i18n/tasks' | ||
|
||
class I18nTest < ActiveSupport::TestCase | ||
def setup | ||
@i18n = I18n::Tasks::BaseTask.new | ||
@missing_keys = @i18n.missing_keys | ||
@unused_keys = @i18n.unused_keys | ||
end | ||
|
||
def test_no_missing_keys | ||
assert_empty @missing_keys, | ||
"Missing #{@missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them" | ||
end | ||
|
||
def test_no_unused_keys | ||
assert_empty @unused_keys, | ||
"#{@unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them" | ||
end | ||
end |