Sha256: f2cc1a170c75b61e423e2c0ba905b049d894870bad2bc418f6f0b1faa76f5971

Contents?: true

Size: 1.37 KB

Versions: 44

Compression:

Stored size: 1.37 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
    expect(@release_path.join('config', 'database.yml')).to exist
  end

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

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

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

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

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
engineyard-serverside-2.8.0.pre4 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.8.0.pre spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.17 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.15.pre spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.14 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.13 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12.prewut5 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12.prewut4 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12.prewut3 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12.prewut2 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12.prewut1 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.12.prewut0 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.11 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.10 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.9pre3 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.9pre2 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.9pre1 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.8 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.6.8pre2 spec/sqlite3_deploy_spec.rb