Sha256: b55d6cac4d26e8188a96950bfdde2431fb8cc669ee02c417f3d73dd85f443bb6

Contents?: true

Size: 645 Bytes

Versions: 21

Compression:

Stored size: 645 Bytes

Contents

require 'spec_helper'

describe Brightcontent::TranslationHelper do
  let(:string) { "thing" }
  let(:model) { Brightcontent::AdminUser }

  describe '#nominative_plural' do
    it "pluralizes strings" do
      expect(nominative_plural(string)).to eq("things")
    end

    it "pluralizes active record models" do
      expect(nominative_plural(model)).to eq("Admins")
    end
  end

  describe '#nominative_singular' do
    it "returns a singular strings" do
      expect(nominative_singular(string)).to eq("thing")
    end

    it "deals with active record models" do
      expect(nominative_singular(model)).to eq("Admin")
    end
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
brightcontent-core-2.4.6 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.4.5 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.4.4 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.4.3 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.4.2 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.4.1 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.4.0 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.3.4 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.3.3 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.3.2 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.3.1 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.3.0 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.2.2 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.2.1 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.2.0 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.1.5 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.1.4 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.1.3 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.1.2 spec/helpers/brightcontent/translation_helper_spec.rb
brightcontent-core-2.1.1 spec/helpers/brightcontent/translation_helper_spec.rb