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.47 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.46 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.45 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.44 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.43 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.42 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.41 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.40 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.39 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.38 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.37 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.36 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.35 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.34 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.33 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.32 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.31 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.30 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.29 spec/rails_assets_spec.rb
capistrano-deploy-management-0.1.28 spec/rails_assets_spec.rb