Sha256: 88ec26b874cdc9323eb570135caf7cdb63409fc54726688eb7fd1f21000b8a48

Contents?: true

Size: 644 Bytes

Versions: 14

Compression:

Stored size: 644 Bytes

Contents

require 'spec_helper'

module Humanize
  describe Configuration do
    after(:each) do
      Humanize.reset_config
    end

    describe "#default_locale" do
      it "default value is :en" do
        expect(Humanize.config.default_locale).to eq(:en)
      end

      it "value can be changed using a block" do
        Humanize.configure do |config|
          config.default_locale = :fr
        end
        expect(Humanize.config.default_locale).to eq(:fr)
      end

      it "value can be changed directly" do
        Humanize.config.default_locale = :fr
        expect(Humanize.config.default_locale).to eq(:fr)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
humanize-3.0.0 spec/configuration_spec.rb
humanize-2.5.1 spec/configuration_spec.rb
humanize-2.5.0 spec/configuration_spec.rb
humanize-2.4.3 spec/configuration_spec.rb
humanize-2.4.2 spec/configuration_spec.rb
humanize-2.4.1 spec/configuration_spec.rb
humanize-2.4.0 spec/configuration_spec.rb
humanize-2.3.0 spec/configuration_spec.rb
humanize-2.2.1 spec/configuration_spec.rb
humanize-2.2.0 spec/configuration_spec.rb
humanize-2.1.2 spec/configuration_spec.rb
humanize-2.1.1 spec/configuration_spec.rb
humanize-2.1.0 spec/configuration_spec.rb
humanize-2.0.0 spec/configuration_spec.rb