Sha256: 5740964b7f9b8d0731b4e074baea005450e1d5ff13cec258fcd534cd07ae6081

Contents?: true

Size: 548 Bytes

Versions: 34

Compression:

Stored size: 548 Bytes

Contents

require "rails_helper"

RSpec.describe Dorsale::ModelI18n, type: :model do
  it "should translate model name on class" do
    expect(User.t).to eq "Utilisateur"
    expect(User.ts).to eq "Utilisateurs"
  end

  it "should translate model name on instances" do
    expect(User.new.t).to eq "Utilisateur"
    expect(User.new.ts).to eq "Utilisateurs"
  end

  it "should translate attributes on class" do
    expect(User.t :name).to eq "Nom"
  end

  it "should translate attributes on instances" do
    expect(User.new.t :name).to eq "Nom"
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
dorsale-3.4.0 spec/models/concerns/dorsale/model_i18n_spec.rb
dorsale-3.3.0 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.2.0 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.7 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.6 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.5 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.4 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.3 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.2 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.1 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.1.0 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.0.3 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.0.2 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.0.1 spec/models/dorsale/model_i18n_spec.rb
dorsale-3.0.0 spec/models/dorsale/model_i18n_spec.rb
dorsale-2.7.3 spec/models/dorsale/model_i18n_spec.rb
dorsale-2.7.2 spec/models/dorsale/model_i18n_spec.rb
dorsale-2.7.1 spec/models/dorsale/model_i18n_spec.rb
dorsale-2.7.0 spec/models/dorsale/model_i18n_spec.rb
dorsale-2.6.8 spec/models/dorsale/model_i18n_spec.rb