Sha256: 3a8fc8045c79e174aded92d9bc2e407a1235a6895f5dc04f1275de2710a3a156

Contents?: true

Size: 869 Bytes

Versions: 18

Compression:

Stored size: 869 Bytes

Contents

require 'spec_helper'

describe "deploy" do
  before { subject.load('deploy') }
  include_context :capistrano

  let(:deploy) { subject.namespaces[:deploy] }

  context "domain my-domain.com" do
    before {
      subject.set :domain, 'my-domain.com'
    }

    its(:deploy_to) { should == '/var/www/my-domain.com' }
    its(:group) { should == :www }

    it "performs set_permissions after deploy" do
#      raise deploy.callbacks[:after].inspect
      deploy.should callback(:set_permissions).after(:update_code)
    end

    context 'set_permissions task' do

      it "changes permissions of deploy directory" do
        subject.load 'deploy'
        subject.set :group, 'my-group'
        subject.set :use_sudo, false
        subject.execute_task(task)
        subject.should have_run("chgrp -R my-group #{subject.fetch(:deploy_to)}")
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
o2h-0.2.1 spec/recipes/deploy_spec.rb
o2h-0.2.0 spec/recipes/deploy_spec.rb
o2h-0.1.16 spec/recipes/deploy_spec.rb
o2h-0.1.15 spec/recipes/deploy_spec.rb
o2h-0.1.14 spec/recipes/deploy_spec.rb
o2h-0.1.13 spec/recipes/deploy_spec.rb
o2h-0.1.12 spec/recipes/deploy_spec.rb
o2h-0.1.11 spec/recipes/deploy_spec.rb
o2h-0.1.10 spec/recipes/deploy_spec.rb
o2h-0.1.9 spec/recipes/deploy_spec.rb
o2h-0.1.8 spec/recipes/deploy_spec.rb
o2h-0.1.7 spec/recipes/deploy_spec.rb
o2h-0.1.6 spec/recipes/deploy_spec.rb
o2h-0.1.5 spec/recipes/deploy_spec.rb
o2h-0.1.4 spec/recipes/deploy_spec.rb
o2h-0.1.3 spec/recipes/deploy_spec.rb
o2h-0.1.2 spec/recipes/deploy_spec.rb
o2h-0.1.1 spec/recipes/deploy_spec.rb