Sha256: af429bed0d4d0c46161426788d22f79d00f8435ef522e490905981e59c100124
Contents?: true
Size: 825 Bytes
Versions: 7
Compression:
Stored size: 825 Bytes
Contents
require "rails_helper" RSpec.describe "i18n" do before :all do Rails.application.eager_load! end # TODO : test FR + EN ActiveRecord::Base.descendants.each do |model| next unless model.to_s.start_with?("Dorsale") it "should i18n #{model} model name" do i18n = model.model_name.human(default: "") expect(i18n).to be_present end model.column_names.each do |column_name| next if column_name.end_with?("_type") next if column_name.end_with?("_bak") next if column_name.start_with?("old_") # user_id => user column_name = column_name[0..-4] if column_name.end_with?("_id") it "should i18n #{model}##{column_name}" do i18n = model.human_attribute_name(column_name, default: "") expect(i18n).to be_present end end end end
Version data entries
7 entries across 7 versions & 1 rubygems