Sha256: 7a051771b1555531c9efa347bc0706a81aeb0b2d4fde5278bff11ab73993bda6

Contents?: true

Size: 392 Bytes

Versions: 12

Compression:

Stored size: 392 Bytes

Contents

module UnitTests
  module I18nFaker
    extend self

    def self.configure_example_group(example_group)
      example_group.include(self)
    end

    def stub_translation(key_or_keys, message)
      keys = [key_or_keys].flatten.join('.').split('.')
      tree = keys.reverse.inject(message) { |data, key| { key => data } }
      I18n.backend.store_translations(:en, tree)
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
shoulda-matchers-3.1.3 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-4.0.0.rc1 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-3.1.2 spec/support/unit/helpers/i18n_faker.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/shoulda-matchers-2.8.0/spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-3.1.1 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-3.1.0 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-3.0.1 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-3.0.0 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-3.0.0.rc1 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-2.8.0 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-2.8.0.rc2 spec/support/unit/helpers/i18n_faker.rb
shoulda-matchers-2.8.0.rc1 spec/support/unit/helpers/i18n_faker.rb