Methods
Instance Public methods
setup()
Link
# File activerecord/test/cases/tasks/postgresql_rake_test.rb, line 78 def setup @connection = stub(:drop_database => true) @configuration = { 'adapter' => 'postgresql', 'database' => 'my-app-db' } ActiveRecord::Base.stubs(:connection).returns(@connection) ActiveRecord::Base.stubs(:establish_connection).returns(true) end
test_drops_database()
Link
test_establishes_connection_to_postgresql_database()
Link
# File activerecord/test/cases/tasks/postgresql_rake_test.rb, line 89 def test_establishes_connection_to_postgresql_database ActiveRecord::Base.expects(:establish_connection).with( 'adapter' => 'postgresql', 'database' => 'postgres', 'schema_search_path' => 'public' ) ActiveRecord::Tasks::DatabaseTasks.drop @configuration end