Sha256: 821b567a344feb41b02f881d20c49fbe4c5ae6b1513ba9080d4a71c342e3ab2d

Contents?: true

Size: 881 Bytes

Versions: 8

Compression:

Stored size: 881 Bytes

Contents

require 'spec_helper'

module DutyCalculator
  describe Configuration do
    let(:api_root) {'http://www.dutycalculator.com/'}
    let(:api_version) {'api2.1'}
    let(:sandbox) {'true'}
    let(:debug) {'true'}

    describe 'has defaults' do
      it 'should default value' do
        expect(Configuration.new.api_root).to eq(api_root)
        expect(Configuration.new.api_version).to eq(api_version)
      end
    end
    describe 'can override defaults' do
      it 'can set value' do
        config = Configuration.new
        config.api_root = api_root
        config.api_version = api_version
        config.sandbox = sandbox
        config.debug = debug

        expect(config.api_root).to eq(api_root)
        expect(config.api_version).to eq(api_version)
        expect(config.sandbox).to eq(sandbox)
        expect(config.debug).to eq(debug)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
duty_calculator-0.0.8 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.7 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.6 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.5 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.4 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.3 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.2 spec/duty_calculator/configuration_spec.rb
duty_calculator-0.0.1 spec/duty_calculator/configuration_spec.rb