Sha256: 477c5df15008a060092fec76ece2fb707ec958fea3240095333de128081f7400

Contents?: true

Size: 650 Bytes

Versions: 11

Compression:

Stored size: 650 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

11 entries across 11 versions & 1 rubygems

Version Path
humanize-1.8.1 spec/configuration_spec.rb
humanize-1.8.0 spec/configuration_spec.rb
humanize-1.7.0 spec/configuration_spec.rb
humanize-1.6.1 spec/configuration_spec.rb
humanize-1.6.0 spec/configuration_spec.rb
humanize-1.5.0 spec/configuration_spec.rb
humanize-1.4.0 spec/configuration_spec.rb
humanize-1.3.0 spec/configuration_spec.rb
humanize-1.2.4 spec/configuration_spec.rb
humanize-1.2.3 spec/configuration_spec.rb
humanize-1.2.2 spec/configuration_spec.rb