Methods
- S
- T
Instance Public methods
setup()
Link
# File activerecord/test/cases/tasks/postgresql_rake_test.rb, line 134 def setup @connection = stub(:create_database => true, :drop_database => true) @configuration = { 'adapter' => 'postgresql', 'database' => 'my-app-db' } ActiveRecord::Base.stubs(:connection).returns(@connection) ActiveRecord::Base.stubs(:clear_active_connections!).returns(true) ActiveRecord::Base.stubs(:establish_connection).returns(true) end
test_clears_active_connections()
Link
test_creates_database()
Link
test_drops_database()
Link
test_establishes_connection()
Link
test_establishes_connection_to_postgresql_database()
Link
# File activerecord/test/cases/tasks/postgresql_rake_test.rb, line 152 def test_establishes_connection_to_postgresql_database ActiveRecord::Base.expects(:establish_connection).with( 'adapter' => 'postgresql', 'database' => 'postgres', 'schema_search_path' => 'public' ) ActiveRecord::Tasks::DatabaseTasks.purge @configuration end