Sha256: f7111f820151bda7c72d67235f66b90de292e8cc0f1f52a794fecd37f324bda0

Contents?: true

Size: 672 Bytes

Versions: 6

Compression:

Stored size: 672 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 -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 !@full_environment_loaded
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
intentmedia-activerecord-jdbc-adapter-1.1.1.1 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.1.1 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.1.0 test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.0.3-java test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.0.2-java test/postgres_db_create_test.rb
activerecord-jdbc-adapter-1.0.1-java test/postgres_db_create_test.rb