Sha256: f44c9517e526ae7989499251379e926cc40f3e16fdbd296a7852a58407d011a8

Contents?: true

Size: 796 Bytes

Versions: 8

Compression:

Stored size: 796 Bytes

Contents

# encoding: UTF-8

shared_examples 'a config util' do
  tempdir_context 'with an existing config directory' do

    before do
      FileUtils.mkdir_p config_dir
    end

    context 'without an existing configuration' do
      describe '#get_config' do
        it 'should return false' do
          Rivet::Utils.get_config('autoscale','unit_test', config_dir).should be_false
        end
      end
    end

    context 'with a configuration file' do
      before do
        File.open(config_file, 'w') { |f| f.write(config_content) }
      end

      describe '#get_config' do
        it 'should return a valid configuration' do
          config = Rivet::Utils.get_config('autoscale', 'unit_test', config_dir)
          valid_config?(config, dsl_values)
        end
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rivet-3.2.0 spec/shared_examples/a_config_util.rb
rivet-3.1.0 spec/shared_examples/a_config_util.rb
rivet-3.0.5 spec/shared_examples/a_config_util.rb
rivet-3.0.4 spec/shared_examples/a_config_util.rb
rivet-3.0.3 spec/shared_examples/a_config_util.rb
rivet-3.0.2 spec/shared_examples/a_config_util.rb
rivet-3.0.1 spec/shared_examples/a_config_util.rb
rivet-3.0.0 spec/shared_examples/a_config_util.rb