Method: Ndd::RSpec::Rails::Matchers::Model#have_a_translated_model
- Defined in:
- lib/ndd/rspec/rails/matchers/model.rb
#have_a_translated_model ⇒ Ndd::RSpec::Rails::Matchers::Model::HaveATranslatedModel
Ensure that a model has an associated translation.
More precisely, ensure that
I18n.t(locale, "activerecord.models.{snake_case_class_name}")
returns a value for the default locale (i.e. I18n.default_locale) or all the available locales (i.e. I18n.available_locales).
90 91 92 |
# File 'lib/ndd/rspec/rails/matchers/model.rb', line 90 def have_a_translated_model # rubocop:disable Style/PredicateName HaveATranslatedModel.new end |