Sha256: d69a29b837daf825abca21e051a425690be3e38cae7afe6d0e525ac224888fe0

Contents?: true

Size: 542 Bytes

Versions: 20

Compression:

Stored size: 542 Bytes

Contents

require 'routemaster/config'

RSpec.describe Routemaster::Config do
  describe '.cache_expiry' do
    subject { described_class.cache_expiry }

    context 'when using the default' do
      it 'should be 90 days' do
        should eq 86_400 * 90
      end
    end

    context 'when overridden with ROUTEMASTER_CACHE_EXPIRY' do
      before { ENV['ROUTEMASTER_CACHE_EXPIRY'] = '123456' }
      after  { ENV['ROUTEMASTER_CACHE_EXPIRY'] = nil }

      it 'should be the configured value' do
        should eq 123456
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
routemaster-drain-3.7.1 spec/routemaster/config_spec.rb
routemaster-drain-3.7.0 spec/routemaster/config_spec.rb
routemaster-drain-3.6.8 spec/routemaster/config_spec.rb
routemaster-drain-3.6.7 spec/routemaster/config_spec.rb
routemaster-drain-3.6.6 spec/routemaster/config_spec.rb
routemaster-drain-3.6.5 spec/routemaster/config_spec.rb
routemaster-drain-3.6.4 spec/routemaster/config_spec.rb
routemaster-drain-3.6.3 spec/routemaster/config_spec.rb
routemaster-drain-3.6.2 spec/routemaster/config_spec.rb
routemaster-drain-3.6.1 spec/routemaster/config_spec.rb
routemaster-drain-3.6.0 spec/routemaster/config_spec.rb
routemaster-drain-3.5.1 spec/routemaster/config_spec.rb
routemaster-drain-3.5.0 spec/routemaster/config_spec.rb
routemaster-drain-3.4.0 spec/routemaster/config_spec.rb
routemaster-drain-3.3.0 spec/routemaster/config_spec.rb
routemaster-drain-3.2.0 spec/routemaster/config_spec.rb
routemaster-drain-3.1.0 spec/routemaster/config_spec.rb
routemaster-drain-3.0.3 spec/routemaster/config_spec.rb
routemaster-drain-3.0.2 spec/routemaster/config_spec.rb
routemaster-drain-3.0.1 spec/routemaster/config_spec.rb