No commit activity in last 3 years
No release in over 3 years
RSpec matchers for testing the completeness of interpolation arguments in locale files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

>= 2.0
 Project Readme

i18n_interpolation_spec

Circle CI

i18n_interpolation_spec provides RSpec matchers for testing the completeness of interpolation arguments in locale files.

It's great to use with tigrish/i18n-spec.

Installation

Add the gem to your Gemfile.

gem 'i18n_interpolation_spec', group: :test

Matchers

describe 'config/locales/fr.yml' do
  it { is_expected.to be_a_complete_interpolation_of 'config/locales/en.yml' }
end

describe 'config/locales/it.yml' do
  it { is_expected.to have_mutual_interpolation_of 'config/locales/en.yml' }
end

describe 'config/locales/es.yml' do
  it {
    is_expected.to be_a_complete_interpolation_of 'config/locales/en.yml',
      except: [
        'some.key.to.ignore',
        /^some\.patt[e3]rn\.to\.ignore/,
      ]
  }
end

License

This project is copyright by Creasty, released under the MIT license.
See LICENSE file for details.