Sha256: a35ddceee9c0dc83b6f8348f0d7739760adc6566deeab1177720068100360f0e

Contents?: true

Size: 242 Bytes

Versions: 17

Compression:

Stored size: 242 Bytes

Contents

module I18nFaker
  def stub_translation(key, message)
    yml =  key.split('.').reverse.inject(message) { |a, n| { n => a } }
    I18n.backend.store_translations(:en, yml)
  end
end

RSpec.configure do |config|
  config.include I18nFaker
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
shoulda-matchers-2.7.0 spec/support/i18n_faker.rb
shoulda-matchers-2.6.2 spec/support/i18n_faker.rb
mcmire-shoulda-matchers-2.6.2.docs.1 spec/support/i18n_faker.rb
mcmire-shoulda-matchers-2.6.1.docs.1 spec/support/i18n_faker.rb
shoulda-matchers-2.6.1 spec/support/i18n_faker.rb
shoulda-matchers-2.6.1.rc2 spec/support/i18n_faker.rb
shoulda-matchers-2.6.1.rc1 spec/support/i18n_faker.rb
shoulda-matchers-2.6.0 spec/support/i18n_faker.rb
mcmire-shoulda-matchers-2.5.0 spec/support/i18n_faker.rb
shoulda-matchers-2.5.0 spec/support/i18n_faker.rb
shoulda-matchers-2.4.0 spec/support/i18n_faker.rb
shoulda-matchers-2.4.0.rc1 spec/support/i18n_faker.rb
shoulda-matchers-2.3.0 spec/support/i18n_faker.rb
challah-1.0.0 vendor/bundle/gems/shoulda-matchers-2.2.0/spec/support/i18n_faker.rb
shoulda-matchers-2.2.0 spec/support/i18n_faker.rb
challah-1.0.0.beta3 vendor/bundle/gems/shoulda-matchers-2.1.0/spec/support/i18n_faker.rb
shoulda-matchers-2.1.0 spec/support/i18n_faker.rb