Sha256: d8e5bebfd90cba19ebe2d498b038703da06446e8bb4a758dac6f0848018694a9

Contents?: true

Size: 1.04 KB

Versions: 6

Compression:

Stored size: 1.04 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') do |deployer|
      @shared_path   = deployer.shared_path
      @release_path  = deployer.release_path
      @framework_env = deployer.framework_env
    end
  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

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
engineyard-serverside-2.0.0.pre5 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.0.0.pre4 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.0.0.pre3 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.0.0.pre2 spec/sqlite3_deploy_spec.rb
engineyard-serverside-2.0.0.pre1 spec/sqlite3_deploy_spec.rb
engineyard-serverside-1.7.0.pre2 spec/sqlite3_deploy_spec.rb