Skip to content

Instantly share code, notes, and snippets.

@BDQ
Created October 20, 2011 08:16
Show Gist options
  • Save BDQ/1300654 to your computer and use it in GitHub Desktop.
Save BDQ/1300654 to your computer and use it in GitHub Desktop.
Apartment Test output
bqimac:apartment[master]$ bundle exec rake spec
(in /Users/briandquinn/Development/apartment)
/Users/briandquinn/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S bundle exec rspec spec/adapters/mysql_adapter_spec.rb spec/adapters/postgresql_adapter_spec.rb spec/apartment_spec.rb spec/integration/apartment_rake_integration_spec.rb spec/integration/database_integration_spec.rb spec/integration/delayed_job_integration_spec.rb spec/integration/middleware/subdomain_elevator_spec.rb spec/tasks/apartment_rake_spec.rb spec/unit/config_spec.rb spec/unit/middleware/subdomain_elevator_spec.rb spec/unit/migrator_spec.rb spec/unit/reloader_spec.rb
/Users/briandquinn/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
Apartment::Adapters::MysqlAdapter
using databases
#create
DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters should define a visitor_for method which returns the appropriate visitor for the database. For example, MysqlAdapter.visitor_for(pool) returns Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at /Users/briandquinn/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201)
DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters should define a visitor_for method which returns the appropriate visitor for the database. For example, MysqlAdapter.visitor_for(pool) returns Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at /Users/briandquinn/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201)
should create the new database (FAILED - 1)
Apartment::Adapters::PostgresqlAdapter
using schemas
#create
should create the new schema (FAILED - 2)
should load schema.rb to new schema (FAILED - 3)
should reset connection when finished (FAILED - 4)
#drop
should delete the database (FAILED - 5)
should raise an error for unkown database (FAILED - 6)
#process
should connect (FAILED - 7)
should reset (FAILED - 8)
#reset
should reset connection (FAILED - 9)
#switch
should connect to new schema (FAILED - 10)
should reset connection if database is nil (FAILED - 11)
#current_database
should return the current schema name (FAILED - 12)
Apartment
should be valid
should be a valid app
apartment rake tasks
with x number of databases
#migrate
should migrate all databases
#rollback
should rollback all dbs (FAILED - 13)
apartment:seed
should seed all databases
Apartment::Database
using postgresql
#init
should process model exclusions
#adapter
should load postgresql adapter
should raise exception with invalid adapter specified
with schemas
#process
should connect to new schema (FAILED - 14)
should reset connection to the previous db (FAILED - 15)
should reset to previous schema if database is nil (FAILED - 16)
should set to public schema if database is nil (FAILED - 17)
#create
should create new postgres schema (FAILED - 18)
should seed data (FAILED - 19)
#switch
should connect to new schema (FAILED - 20)
should fail with invalid schema (FAILED - 21)
creating models
should create a model instance in the current schema (FAILED - 22)
with excluded models
should ignore excluded models (FAILED - 23)
should create excluded models in public schema (FAILED - 24)
#current_database
should return the current schema search path (FAILED - 25)
Apartment::Delayed
Apartment::Delayed::Job
#enqueue
should queue up jobs in the public schema (FAILED - 26)
should not queue jobs in the current schema (FAILED - 27)
Apartment::Delayed::Requirements
should initialize a database attribute on a class (FAILED - 28)
should not overwrite any previous after_initialize declarations (FAILED - 29)
should set the db on a new record before it saves (FAILED - 30)
serialization
should serialize the proper database attribute (FAILED - 31)
Apartment::Elevators::Subdomain
single request
should switch the db (FAILED - 32)
simultaneous requests
should fetch the correct user count for each session based on subdomain (FAILED - 33)
apartment rake tasks
database migration
apartment:migrate
Migrating company1 database
Migrating company2 database
Migrating company3 database
should migrate public and all multi-tenant dbs
apartment:migrate:up
without a version
requires a version to migrate to
with version
Migrating company1 database up
Migrating company2 database up
Migrating company3 database up
migrates up to a specific version
apartment:migrate:down
without a version
requires a version to migrate to
with version
Migrating company1 database down
Migrating company2 database down
Migrating company3 database down
migrates up to a specific version
apartment:rollback
Rolling back company1 database
Rolling back company2 database
Rolling back company3 database
should rollback dbs
Rolling back company1 database
Rolling back company2 database
Rolling back company3 database
should rollback dbs STEP amt
Apartment
#config
should yield the Apartment object
should set excluded models
should set postgres_schemas
should set seed_after_create
databases
should return object if it doesnt respond_to call
should invoke the proc if appropriate
should return the invoked proc if appropriate
Apartment::Elevators::Subdomain
#subdomain
should parse subdomain
should return nil when no subdomain
Apartment::Migrator
postgresql
using schemas
#migrate
should connect to new db, then reset when done (FAILED - 34)
should migrate db (FAILED - 35)
#run
up
should connect to new db, then reset when done (FAILED - 36)
should migrate to a version (FAILED - 37)
down
should connect to new db, then reset when done (FAILED - 38)
should migrate to a version (FAILED - 39)
#rollback
should rollback the db (FAILED - 40)
Apartment::Reloader
using postgresql schemas
should initialize apartment when called
Failures:
1) Apartment::Adapters::MysqlAdapter using databases#create should create the new database
Failure/Error: @mysql.create(database1)
ArgumentError:
wrong number of arguments (3 for 2)
# ./lib/apartment/adapters/abstract_adapter.rb:38:in `current_database'
# ./lib/apartment/adapters/abstract_adapter.rb:67:in `process'
# ./lib/apartment/adapters/abstract_adapter.rb:25:in `create'
# ./spec/adapters/mysql_adapter_spec.rb:20:in `block (3 levels) in <top (required)>'
2) Apartment::Adapters::PostgresqlAdapter using schemas#create should create the new schema
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
3) Apartment::Adapters::PostgresqlAdapter using schemas#create should load schema.rb to new schema
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
4) Apartment::Adapters::PostgresqlAdapter using schemas#create should reset connection when finished
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
5) Apartment::Adapters::PostgresqlAdapter using schemas#drop should delete the database
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
6) Apartment::Adapters::PostgresqlAdapter using schemas#drop should raise an error for unkown database
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
7) Apartment::Adapters::PostgresqlAdapter using schemas#process should connect
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
8) Apartment::Adapters::PostgresqlAdapter using schemas#process should reset
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
9) Apartment::Adapters::PostgresqlAdapter using schemas#reset should reset connection
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
10) Apartment::Adapters::PostgresqlAdapter using schemas#switch should connect to new schema
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
11) Apartment::Adapters::PostgresqlAdapter using schemas#switch should reset connection if database is nil
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
12) Apartment::Adapters::PostgresqlAdapter using schemas#current_database should return the current schema name
Failure/Error: subject.create(schema)
Apartment::SchemaExists:
The schema first_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./spec/adapters/postgresql_adapter_spec.rb:25:in `block (3 levels) in <top (required)>'
13) apartment rake tasks with x number of databases#rollback should rollback all dbs
Failure/Error: @rake['apartment:rollback'].invoke
RuntimeError:
Don't know how to build task 'rails_env'
# ./spec/integration/apartment_rake_integration_spec.rb:56:in `block (4 levels) in <top (required)>'
14) Apartment::Database using postgresql with schemas#process should connect to new schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
15) Apartment::Database using postgresql with schemas#process should reset connection to the previous db
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
16) Apartment::Database using postgresql with schemas#process should reset to previous schema if database is nil
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
17) Apartment::Database using postgresql with schemas#process should set to public schema if database is nil
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
18) Apartment::Database using postgresql with schemas#create should create new postgres schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
19) Apartment::Database using postgresql with schemas#create should seed data
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
20) Apartment::Database using postgresql with schemas#switch should connect to new schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
21) Apartment::Database using postgresql with schemas#switch should fail with invalid schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
22) Apartment::Database using postgresql with schemas#switch creating models should create a model instance in the current schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
23) Apartment::Database using postgresql with schemas#switch with excluded models should ignore excluded models
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
24) Apartment::Database using postgresql with schemas#switch with excluded models should create excluded models in public schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
25) Apartment::Database using postgresql with schemas#current_database should return the current schema search path
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/database_integration_spec.rb:67:in `block (4 levels) in <top (required)>'
26) Apartment::Delayed Apartment::Delayed::Job#enqueue should queue up jobs in the public schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/delayed_job_integration_spec.rb:23:in `block (2 levels) in <top (required)>'
27) Apartment::Delayed Apartment::Delayed::Job#enqueue should not queue jobs in the current schema
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/delayed_job_integration_spec.rb:23:in `block (2 levels) in <top (required)>'
28) Apartment::Delayed Apartment::Delayed::Requirements should initialize a database attribute on a class
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/delayed_job_integration_spec.rb:23:in `block (2 levels) in <top (required)>'
29) Apartment::Delayed Apartment::Delayed::Requirements should not overwrite any previous after_initialize declarations
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/delayed_job_integration_spec.rb:23:in `block (2 levels) in <top (required)>'
30) Apartment::Delayed Apartment::Delayed::Requirements should set the db on a new record before it saves
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/delayed_job_integration_spec.rb:23:in `block (2 levels) in <top (required)>'
31) Apartment::Delayed Apartment::Delayed::Requirements serialization should serialize the proper database attribute
Failure/Error: Apartment::Database.create database
Apartment::SchemaExists:
The schema some_new_database already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/delayed_job_integration_spec.rb:23:in `block (2 levels) in <top (required)>'
32) Apartment::Elevators::Subdomain single request should switch the db
Failure/Error: Apartment::Database.create(company.subdomain)
Apartment::SchemaExists:
The schema foo already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/middleware/subdomain_elevator_spec.rb:12:in `block (2 levels) in <top (required)>'
33) Apartment::Elevators::Subdomain simultaneous requests should fetch the correct user count for each session based on subdomain
Failure/Error: Apartment::Database.create(company.subdomain)
Apartment::SchemaExists:
The schema foo already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/integration/middleware/subdomain_elevator_spec.rb:12:in `block (2 levels) in <top (required)>'
34) Apartment::Migrator postgresql using schemas#migrate should connect to new db, then reset when done
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
35) Apartment::Migrator postgresql using schemas#migrate should migrate db
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
36) Apartment::Migrator postgresql using schemas#run up should connect to new db, then reset when done
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
37) Apartment::Migrator postgresql using schemas#run up should migrate to a version
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
38) Apartment::Migrator postgresql using schemas#run down should connect to new db, then reset when done
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
39) Apartment::Migrator postgresql using schemas#run down should migrate to a version
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
40) Apartment::Migrator postgresql using schemas#rollback should rollback the db
Failure/Error: Apartment::Database.create schema_name # create the schema
Apartment::SchemaExists:
The schema some_db_schema already exists.
# ./lib/apartment/adapters/postgresql_adapter.rb:108:in `rescue in create_database'
# ./lib/apartment/adapters/postgresql_adapter.rb:105:in `create_database'
# ./lib/apartment/adapters/abstract_adapter.rb:23:in `create'
# ./lib/apartment/database.rb:10:in `create'
# ./spec/unit/migrator_spec.rb:20:in `block (2 levels) in <top (required)>'
Finished in 3.36 seconds
64 examples, 40 failures
Failed examples:
rspec ./spec/adapters/mysql_adapter_spec.rb:28 # Apartment::Adapters::MysqlAdapter using databases#create should create the new database
rspec ./spec/adapters/postgresql_adapter_spec.rb:34 # Apartment::Adapters::PostgresqlAdapter using schemas#create should create the new schema
rspec ./spec/adapters/postgresql_adapter_spec.rb:38 # Apartment::Adapters::PostgresqlAdapter using schemas#create should load schema.rb to new schema
rspec ./spec/adapters/postgresql_adapter_spec.rb:43 # Apartment::Adapters::PostgresqlAdapter using schemas#create should reset connection when finished
rspec ./spec/adapters/postgresql_adapter_spec.rb:50 # Apartment::Adapters::PostgresqlAdapter using schemas#drop should delete the database
rspec ./spec/adapters/postgresql_adapter_spec.rb:58 # Apartment::Adapters::PostgresqlAdapter using schemas#drop should raise an error for unkown database
rspec ./spec/adapters/postgresql_adapter_spec.rb:67 # Apartment::Adapters::PostgresqlAdapter using schemas#process should connect
rspec ./spec/adapters/postgresql_adapter_spec.rb:73 # Apartment::Adapters::PostgresqlAdapter using schemas#process should reset
rspec ./spec/adapters/postgresql_adapter_spec.rb:80 # Apartment::Adapters::PostgresqlAdapter using schemas#reset should reset connection
rspec ./spec/adapters/postgresql_adapter_spec.rb:88 # Apartment::Adapters::PostgresqlAdapter using schemas#switch should connect to new schema
rspec ./spec/adapters/postgresql_adapter_spec.rb:93 # Apartment::Adapters::PostgresqlAdapter using schemas#switch should reset connection if database is nil
rspec ./spec/adapters/postgresql_adapter_spec.rb:100 # Apartment::Adapters::PostgresqlAdapter using schemas#current_database should return the current schema name
rspec ./spec/integration/apartment_rake_integration_spec.rb:51 # apartment rake tasks with x number of databases#rollback should rollback all dbs
rspec ./spec/integration/database_integration_spec.rb:84 # Apartment::Database using postgresql with schemas#process should connect to new schema
rspec ./spec/integration/database_integration_spec.rb:90 # Apartment::Database using postgresql with schemas#process should reset connection to the previous db
rspec ./spec/integration/database_integration_spec.rb:96 # Apartment::Database using postgresql with schemas#process should reset to previous schema if database is nil
rspec ./spec/integration/database_integration_spec.rb:102 # Apartment::Database using postgresql with schemas#process should set to public schema if database is nil
rspec ./spec/integration/database_integration_spec.rb:111 # Apartment::Database using postgresql with schemas#create should create new postgres schema
rspec ./spec/integration/database_integration_spec.rb:115 # Apartment::Database using postgresql with schemas#create should seed data
rspec ./spec/integration/database_integration_spec.rb:125 # Apartment::Database using postgresql with schemas#switch should connect to new schema
rspec ./spec/integration/database_integration_spec.rb:130 # Apartment::Database using postgresql with schemas#switch should fail with invalid schema
rspec ./spec/integration/database_integration_spec.rb:146 # Apartment::Database using postgresql with schemas#switch creating models should create a model instance in the current schema
rspec ./spec/integration/database_integration_spec.rb:170 # Apartment::Database using postgresql with schemas#switch with excluded models should ignore excluded models
rspec ./spec/integration/database_integration_spec.rb:175 # Apartment::Database using postgresql with schemas#switch with excluded models should create excluded models in public schema
rspec ./spec/integration/database_integration_spec.rb:191 # Apartment::Database using postgresql with schemas#current_database should return the current schema search path
rspec ./spec/integration/delayed_job_integration_spec.rb:40 # Apartment::Delayed Apartment::Delayed::Job#enqueue should queue up jobs in the public schema
rspec ./spec/integration/delayed_job_integration_spec.rb:49 # Apartment::Delayed Apartment::Delayed::Job#enqueue should not queue jobs in the current schema
rspec ./spec/integration/delayed_job_integration_spec.rb:66 # Apartment::Delayed Apartment::Delayed::Requirements should initialize a database attribute on a class
rspec ./spec/integration/delayed_job_integration_spec.rb:71 # Apartment::Delayed Apartment::Delayed::Requirements should not overwrite any previous after_initialize declarations
rspec ./spec/integration/delayed_job_integration_spec.rb:85 # Apartment::Delayed Apartment::Delayed::Requirements should set the db on a new record before it saves
rspec ./spec/integration/delayed_job_integration_spec.rb:91 # Apartment::Delayed Apartment::Delayed::Requirements serialization should serialize the proper database attribute
rspec ./spec/integration/middleware/subdomain_elevator_spec.rb:20 # Apartment::Elevators::Subdomain single request should switch the db
rspec ./spec/integration/middleware/subdomain_elevator_spec.rb:48 # Apartment::Elevators::Subdomain simultaneous requests should fetch the correct user count for each session based on subdomain
rspec ./spec/unit/migrator_spec.rb:34 # Apartment::Migrator postgresql using schemas#migrate should connect to new db, then reset when done
rspec ./spec/unit/migrator_spec.rb:40 # Apartment::Migrator postgresql using schemas#migrate should migrate db
rspec ./spec/unit/migrator_spec.rb:49 # Apartment::Migrator postgresql using schemas#run up should connect to new db, then reset when done
rspec ./spec/unit/migrator_spec.rb:55 # Apartment::Migrator postgresql using schemas#run up should migrate to a version
rspec ./spec/unit/migrator_spec.rb:63 # Apartment::Migrator postgresql using schemas#run down should connect to new db, then reset when done
rspec ./spec/unit/migrator_spec.rb:69 # Apartment::Migrator postgresql using schemas#run down should migrate to a version
rspec ./spec/unit/migrator_spec.rb:79 # Apartment::Migrator postgresql using schemas#rollback should rollback the db
rake aborted!
ruby -S bundle exec rspec spec/adapters/mysql_adapter_spec.rb spec/adapters/postgresql_adapter_spec.rb spec/apartment_spec.rb spec/integration/apartment_rake_integration_spec.rb spec/integration/database_integration_spec.rb spec/integration/delayed_job_integration_spec.rb spec/integration/middleware/subdomain_elevator_spec.rb spec/tasks/apartment_rake_spec.rb spec/unit/config_spec.rb spec/unit/middleware/subdomain_elevator_spec.rb spec/unit/migrator_spec.rb spec/unit/reloader_spec.rb faile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment