Sha256: 9b911c05337efe3ce8681007eb6b7535ee7f73eb5ff9b8e39df14e662ee5354b

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 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, '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

4 entries across 4 versions & 1 rubygems

Version Path
capistrano-3.0.0.pre6 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre5 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre4 spec/integration/deploy_update_spec.rb
capistrano-3.0.0.pre3 spec/integration/deploy_update_spec.rb