Sha256: 8916eaa0f7a55f710fadc7c379e0d77d3beeb9556d8f8f885691c956f0b4d572

Contents?: true

Size: 724 Bytes

Versions: 12

Compression:

Stored size: 724 Bytes

Contents

require 'abstract_db_create'
require 'db/postgres'

class PostgresDbCreateTest < Test::Unit::TestCase
  include AbstractDbCreate

  def db_config
    POSTGRES_CONFIG
  end

  if find_executable?("psql")
    def test_rake_db_create
      Rake::Task["db:create"].invoke
      output = `psql -d template1 -c '\\l'`
      assert output =~ /#{@db_name}/m
    end

    def test_rake_db_test_purge
      Rake::Task["db:create"].invoke
      Rake::Task["db:test:purge"].invoke
    end
  else
    def test_skipped
    end
  end

  def test_rake_db_create_does_not_load_full_environment
    Rake::Task["db:create"].invoke
    assert @rails_env_set
    assert !defined?(@full_environment_loaded) || !@full_environment_loaded
  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
cmoran92-activerecord-jdbc-adapter-1.2.1.2 test/postgres_db_create_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.5 test/postgres_db_create_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.4 test/postgres_db_create_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.3 test/postgres_db_create_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.2 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.2.2.1 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-onsite-1.2.2 test/postgres_db_create_test.rb
cmoran92-activerecord-jdbc-adapter-1.2.1.1 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.2.2 test/postgres_db_create_test.rb
cmoran92-activerecord-jdbc-adapter-1.2.1 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.2.1 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.2.0 test/postgres_db_create_test.rb