Sha256: b2ea4448244d3f1130a3e66a09bd5793d873865077f1ad2d282db1078e1da313

Contents?: true

Size: 1.19 KB

Versions: 4

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'

describe Fortress::Configuration do
  describe 'default configuration' do
    it 'should keep a blank configuration' do
      expect(Fortress.configuration).to be_nil
    end
  end
  describe 'externals option' do
    context 'passing nil' do
      before { Fortress.configure { |config| config.externals = nil } }
      it 'should keep a blank configuration' do
        expect(Fortress.configuration.options).to be_nil
      end
    end
    context 'passing a String' do
      before do
        Fortress.configure { |config| config.externals = 'IronMaiden' }
      end
      it 'should add the externals key as an Array with the given string' do
        options = { externals: ['IronMaiden'] }
        expect(Fortress.configuration.options).to eql(options)
      end
    end
    context 'passing an Array of String' do
      before do
        Fortress.configure do |config|
          config.externals = %w(Rocksmith IronMaiden Pantera)
        end
      end
      it 'should add the externals key as an Array with the given string' do
        options = { externals: %w(Rocksmith IronMaiden Pantera) }
        expect(Fortress.configuration.options).to eql(options)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fortress-0.2.3 spec/fortress/configuration_spec.rb
fortress-0.2.2 spec/fortress/configuration_spec.rb
fortress-0.2.1 spec/fortress/configuration_spec.rb
fortress-0.2.0 spec/fortress/configuration_spec.rb