Sha256: b5192410bbf65003fa63ecdc0aeb8c0b50e0f21324cee545d64a8ee5005ad577

Contents?: true

Size: 694 Bytes

Versions: 4

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'
require 'titler'

module Titler
  describe Configuration do

    context 'with configuration block' do
      it 'returns the use_env_prefix' do
        expect(Titler.configuration.use_env_prefix).to be true
      end
    end

    describe "#configure" do
      it "sets use_env_prefix to true" do
        config = Configuration.new
        expect(config.use_env_prefix).to be true
      end

      it "can set use_env_prefix to false" do
        config = Configuration.new
        allow(config).to receive(:use_env_prefix).and_return(false)
        expect(config.use_env_prefix).to be false
      end

      after :each do
        Titler.reset
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
titler-0.4.4 spec/configure_spec.rb
titler-0.4.3 spec/configure_spec.rb
titler-0.4.2 spec/configure_spec.rb
titler-0.4.1 spec/configure_spec.rb