Sha256: f3cf8b3360a98b1e171c749976cbc28521ce4cd753bad96271c744bd63edc332

Contents?: true

Size: 1.34 KB

Versions: 13

Compression:

Stored size: 1.34 KB

Contents

require 'spec_helper'

describe "Deploying an application with sqlite3 as the only DB adapter in the Gemfile.lock" do
  before(:all) do
    @release_path  = nil
    @shared_path   = nil
    @framework_env = nil

    deploy_test_application('sqlite3')
    @shared_path   = @deployer.config.paths.shared
    @release_path  = @deployer.config.paths.active_release
    @framework_env = @deployer.config.framework_env
  end

  it 'should symlink database.sqlite3.yml' do
    @release_path.join('config', 'database.yml').should exist
  end

  it 'should create database.sqlite3.yml in a shared location' do
    @shared_path.join('config', 'database.sqlite3.yml').should exist
  end

  it 'should put a reference to a shared database in database.sqlite3.yml' do
    contents = @release_path.join('config', 'database.yml').read
    contents.should include(@shared_path.join('databases', "#{@framework_env}.sqlite3").expand_path.to_s)
  end

  it 'should create the shared database' do
    @shared_path.join('databases', "#{@framework_env}.sqlite3").should exist
  end

  it 'should contain valid yaml config' do
    config = YAML.load_file(@release_path.join('config', 'database.yml'))
    config[@framework_env]['adapter'].should == 'sqlite3'
    config[@framework_env]['database'].should == @shared_path.join('databases', "#{@framework_env}.sqlite3").expand_path.to_s
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
engineyard-serverside-2.3.9 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.7 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.6 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.5 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.4 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.3 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.2 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.1 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.1.pre.archivefix spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.3.0 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.2.1 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.2.0 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.2.0.rc2 spec/sqlite3_deploy_spec.rb