Sha256: 7271d789d87cadd07124db678bd469c7f6a6953155eff5f2dc03b75336e0fed9

Contents?: true

Size: 950 Bytes

Versions: 48

Compression:

Stored size: 950 Bytes

Contents

require 'spec_helper'

describe 'rails assets' do
  before do
    mock_config do
      use_recipe :rails_assets
      set :deploy_to, '/foo/bar'
    end
  end

  it 'uses rails recipe' do
    config.should be_using_recipe(:rails)
  end

  describe 'deploy:assets:precompile' do
    it 'runs precompile' do
      cli_execute 'deploy:assets:precompile'
      config.should have_run('cd /foo/bar && RAILS_ENV=production RAILS_GROUPS=assets rake assets:precompile')
    end

    it 'uses bundle command' do
      mock_config { use_recipe :bundle }
      cli_execute 'deploy:assets:precompile'
      config.should have_run('cd /foo/bar && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile')
    end
  end

  describe 'deploy:assets:clean' do
    it 'runs clean' do
      cli_execute 'deploy:assets:clean'
      config.should have_run('cd /foo/bar && RAILS_ENV=production RAILS_GROUPS=assets rake assets:clean')
    end
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
capistrano-deploy-management-0.1.25 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.24 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.23 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.22 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.21 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.20 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.19 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.18 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.17 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.16 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.15 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.14 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.13 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.12 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.11 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.10 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.9 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.8 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.7 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.6 spec/rails_assets_spec.rb