Sha256: 558e5f90b6ff0c41da820f7730906f67765b113c9a0bd71491323a9eaa8cf5db

Contents?: true

Size: 810 Bytes

Versions: 49

Compression:

Stored size: 810 Bytes

Contents

require 'spec_helper'

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

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

    it 'runs bundle exec db:migrate when using with bundle' do
      mock_config { use_recipe :bundle }
      cli_execute 'deploy:migrate'
      config.should have_run('cd /foo/bar && RAILS_ENV=production bundle exec rake db:migrate')
    end
  end

  describe 'deploy:migrations' do
    it 'runs update, migrate and restart' do
      cli_execute 'deploy:migrations'
      config.should have_executed('deploy:update', 'deploy:migrate', 'deploy:restart')
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
capistrano-deploy-management-0.1.47 spec/rails_spec.rb
capistrano-deploy-management-0.1.46 spec/rails_spec.rb
capistrano-deploy-management-0.1.45 spec/rails_spec.rb
capistrano-deploy-management-0.1.44 spec/rails_spec.rb
capistrano-deploy-management-0.1.43 spec/rails_spec.rb
capistrano-deploy-management-0.1.42 spec/rails_spec.rb
capistrano-deploy-management-0.1.41 spec/rails_spec.rb
capistrano-deploy-management-0.1.40 spec/rails_spec.rb
capistrano-deploy-management-0.1.39 spec/rails_spec.rb
capistrano-deploy-management-0.1.38 spec/rails_spec.rb
capistrano-deploy-management-0.1.37 spec/rails_spec.rb
capistrano-deploy-management-0.1.36 spec/rails_spec.rb
capistrano-deploy-management-0.1.35 spec/rails_spec.rb
capistrano-deploy-management-0.1.34 spec/rails_spec.rb
capistrano-deploy-management-0.1.33 spec/rails_spec.rb
capistrano-deploy-management-0.1.32 spec/rails_spec.rb
capistrano-deploy-management-0.1.31 spec/rails_spec.rb
capistrano-deploy-management-0.1.30 spec/rails_spec.rb
capistrano-deploy-management-0.1.29 spec/rails_spec.rb
capistrano-deploy-management-0.1.28 spec/rails_spec.rb