Sha256: 5491eda4bd9d1bcd555de4ad39d4b655e0c11bc41c53798db4d187a141ebf544

Contents?: true

Size: 878 Bytes

Versions: 49

Compression:

Stored size: 878 Bytes

Contents

require 'spec_helper'

describe 'deploy' do
  before do
    mock_config do
      use_recipes :git, :rails
      set :deploy_to, '/foo/bar'
    end
  end

  it 'returns used recipes' do
    config.used_recipes.should == [:git, :rails]
  end

  it 'checks if recipe is used' do
    config.should be_using_recipe(:git)
    config.should_not be_using_recipe(:bundle)
  end

  it 'uses recipe once' do
    config.use_recipe :git
    config.used_recipes.should == [:git, :rails]
  end

  it 'aborts when recipe name misspelled' do
    with_stderr do |output|
      expect { config.use_recipe(:rvn) }.to raise_error(SystemExit)
      output.should include('Are you misspelled `rvn` recipe name?')
    end
  end

  describe 'deploy' do
    it 'runs update and restart' do
      cli_execute 'deploy'
      config.should have_executed('deploy:update', 'deploy:restart')
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
capistrano-deploy-management-0.1.47 spec/deploy_spec.rb
capistrano-deploy-management-0.1.46 spec/deploy_spec.rb
capistrano-deploy-management-0.1.45 spec/deploy_spec.rb
capistrano-deploy-management-0.1.44 spec/deploy_spec.rb
capistrano-deploy-management-0.1.43 spec/deploy_spec.rb
capistrano-deploy-management-0.1.42 spec/deploy_spec.rb
capistrano-deploy-management-0.1.41 spec/deploy_spec.rb
capistrano-deploy-management-0.1.40 spec/deploy_spec.rb
capistrano-deploy-management-0.1.39 spec/deploy_spec.rb
capistrano-deploy-management-0.1.38 spec/deploy_spec.rb
capistrano-deploy-management-0.1.37 spec/deploy_spec.rb
capistrano-deploy-management-0.1.36 spec/deploy_spec.rb
capistrano-deploy-management-0.1.35 spec/deploy_spec.rb
capistrano-deploy-management-0.1.34 spec/deploy_spec.rb
capistrano-deploy-management-0.1.33 spec/deploy_spec.rb
capistrano-deploy-management-0.1.32 spec/deploy_spec.rb
capistrano-deploy-management-0.1.31 spec/deploy_spec.rb
capistrano-deploy-management-0.1.30 spec/deploy_spec.rb
capistrano-deploy-management-0.1.29 spec/deploy_spec.rb
capistrano-deploy-management-0.1.28 spec/deploy_spec.rb