Sha256: 31158ceb9b6923e56e36c569ba23f5b68a444635e9b2c378f240f9783748c95f

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'whiskey_disk'))

integration_spec do
  describe 'when an invalid configuration file is specified' do
    before do
      setup_deployment_area
      @config = scenario_config('invalid/deploy.yml')
      @args = "--path=#{@config} --to=project:invalid"
    end
    
    describe 'performing a setup' do
      it 'should exit with a false status' do
        run_setup(@args).should == false
      end
      
      it 'should not create a repo checkout' do
        run_setup(@args)
        File.exists?(deployed_file('project')).should == false
      end
    end
  
    describe 'performing a deployment' do
      before do
        checkout_repo('project')
        File.unlink(deployed_file('project/README'))  # modify the deployed checkout
      end

      it 'should exit with a false status' do
        run_deploy(@args).should == false
      end      
    
      it 'should not update a repo checkout' do
        run_deploy(@args)
        File.exists?(deployed_file('project/README')).should == false
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whiskey_disk-0.6.11 spec/integration/invalid_configuration_spec.rb
whiskey_disk-0.6.10 spec/integration/invalid_configuration_spec.rb