Skip to content

Commit

Permalink
update i18n-tasks to 0.9.30
Browse files Browse the repository at this point in the history
  • Loading branch information
acmetech committed Jan 14, 2020
1 parent 21bb598 commit 3bd408f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -151,7 +151,7 @@ GEM
highline (2.0.3)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.29)
i18n-tasks (0.9.30)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
Expand Down Expand Up @@ -401,7 +401,7 @@ DEPENDENCIES
coveralls_reborn (~> 0.14.0)
database_cleaner (~> 1.7.0)
factory_bot_rails (~> 5.1.1)
i18n-tasks (~> 0.9.29)
i18n-tasks (~> 0.9.30)
inch (~> 0.8.0)
pry (~> 0.12.2)
rails-controller-testing
Expand Down
2 changes: 1 addition & 1 deletion socializer.gemspec
Expand Up @@ -52,7 +52,7 @@ Gem::Specification.new do |s|
# s.add_development_dependency("cucumber-rails", "~> 1.4.0")
# s.add_development_dependency("capybara", "~> 2.5.0")
s.add_development_dependency("factory_bot_rails", "~> 5.1.1")
s.add_development_dependency("i18n-tasks", "~> 0.9.29")
s.add_development_dependency("i18n-tasks", "~> 0.9.30")
s.add_development_dependency("inch", "~> 0.8.0")
s.add_development_dependency("shoulda-matchers", "~> 4.2.0")
# s.add_development_dependency("database_cleaner", "~> 1.6.0")
Expand Down
11 changes: 9 additions & 2 deletions spec/i18n_spec.rb
Expand Up @@ -2,10 +2,11 @@

require 'i18n/tasks'

RSpec.describe 'I18n' do
RSpec.describe I18n do
let(:i18n) { I18n::Tasks::BaseTask.new }
let(:missing_keys) { i18n.missing_keys }
let(:unused_keys) { i18n.unused_keys }
let(:inconsistent_interpolations) { i18n.inconsistent_interpolations }

it 'does not have missing keys' do
expect(missing_keys).to be_empty,
Expand All @@ -21,7 +22,13 @@
non_normalized = i18n.non_normalized_paths
error_message = "The following files need to be normalized:\n" \
"#{non_normalized.map { |path| " #{path}" }.join("\n")}\n" \
'Please run `i18n-tasks normalize` to fix'
"Please run `i18n-tasks normalize' to fix"
expect(non_normalized).to be_empty, error_message
end

it 'does not have inconsistent interpolations' do
error_message = "#{inconsistent_interpolations.leaves.count} i18n keys have inconsistent interpolations.\n" \
"Run `i18n-tasks check-consistent-interpolations' to show them"
expect(inconsistent_interpolations).to be_empty, error_message
end
end

0 comments on commit 3bd408f

Please sign in to comment.