Sha256: ac25882b8e6bc3b055e9daf9a9b3fe8d98da4ec96681d6e0a90b3cc91c251a1a

Contents?: true

Size: 1.66 KB

Versions: 4

Compression:

Stored size: 1.66 KB

Contents

require 'spec_helper'

module Omnibus
  describe Config do
    it 'extends Mixlib::Config' do
      expect(described_class).to be_a(Mixlib::Config)
    end

    before { described_class.reset }

    shared_examples 'a configurable' do |id, default|
      it "responds to .#{id}" do
        expect(described_class).to have_method_defined(id)
      end

      it ".#{id} defaults to #{default.inspect}" do
        expect(described_class.send(id)).to eq(default)
      end
    end

    include_examples 'a configurable', :cache_dir, '/var/cache/omnibus/cache'
    include_examples 'a configurable', :source_dir, '/var/cache/omnibus/src'
    include_examples 'a configurable', :build_dir, '/var/cache/omnibus/build'
    include_examples 'a configurable', :package_dir, '/var/cache/omnibus/pkg'
    include_examples 'a configurable', :package_tmp, '/var/cache/omnibus/pkg-tmp'
    include_examples 'a configurable', :project_root, Dir.pwd
    include_examples 'a configurable', :install_dir, '/opt/chef'
    include_examples 'a configurable', :use_s3_caching, false
    include_examples 'a configurable', :s3_bucket, nil
    include_examples 'a configurable', :s3_access_key, nil
    include_examples 'a configurable', :release_s3_bucket, nil
    include_examples 'a configurable', :release_s3_access_key, nil
    include_examples 'a configurable', :release_s3_secret_key, nil
    include_examples 'a configurable', :override_file, nil
    include_examples 'a configurable', :software_gem, 'omnibus-software'
    include_examples 'a configurable', :solaris_compiler, nil
    include_examples 'a configurable', :append_timestamp, true
    include_examples 'a configurable', :build_retries, 3
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omnibus-2.0.2 spec/config_spec.rb
omnibus-2.0.1 spec/config_spec.rb
omnibus-2.0.0 spec/config_spec.rb
omnibus-2.0.0.rc1 spec/config_spec.rb