Sha256: 872e212d041c982b025753a948fbe978908a53dd7d02ed5b59d34a850f687879

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

require 'integration_spec_helper'

describe 'cap deploy:update', slow: true do
  before do
    install_test_app_with(config)
  end

  describe 'deploy' do
    let(:config) {
      %{
        set :stage, :#{stage}
        set :deploy_to, '#{deploy_to}'
        set :repo_url, 'git://github.com/capistrano/capistrano.git'
        set :branch, 'v3'
        server 'localhost', roles: %w{web app}, user: '#{current_user}'
        set :linked_files, %w{config/database.yml}
        set :linked_dirs, %w{bin log public/system vendor/bundle}
        }
    }

    describe 'symlink' do
      before do
        cap 'deploy:started'
        create_shared_directory('config')
        create_shared_file('config/database.yml')
        cap 'deploy:symlink:shared'
      end

      describe 'linked_dirs' do
        it 'symlinks the directories in shared to `current`' do
          %w{bin log public/system vendor/bundle}.each do |dir|
            expect(release_path.join(dir)).to be_a_symlink_to shared_path.join(dir)
          end
        end
      end

      describe 'linked_files' do
        it 'symlinks the files in shared to `current`' do
          file = 'config/database.yml'
          expect(release_path.join(file)).to be_a_symlink_to shared_path.join(file)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
capistrano-3.0.0.pre13 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre12 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre11 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre10 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre7 spec/integration/deploy_update_spec.rb