Methods
S
T
Instance Public methods
setup()
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 234
def setup
  @configurations = {
    'development' => {'database' => 'dev-db'},
    'test'        => {'database' => 'test-db'},
    'production'  => {'database' => 'prod-db'}
  }

  ActiveRecord::Base.stubs(:configurations).returns(@configurations)
end
test_drops_current_environment_database()
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 244
def test_drops_current_environment_database
  ActiveRecord::Tasks::DatabaseTasks.expects(:drop).
    with('database' => 'prod-db')

  ActiveRecord::Tasks::DatabaseTasks.drop_current(
    ActiveSupport::StringInquirer.new('production')
  )
end
test_drops_only_development_database_when_rails_env_is_development()
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 265
def test_drops_only_development_database_when_rails_env_is_development
  ActiveRecord::Tasks::DatabaseTasks.expects(:drop).
    with('database' => 'dev-db')
  ENV.expects(:[]).with('RAILS_ENV').returns('development')

  ActiveRecord::Tasks::DatabaseTasks.drop_current(
    ActiveSupport::StringInquirer.new('development')
  )
end
test_drops_test_and_development_databases_when_env_was_not_specified()
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 253
def test_drops_test_and_development_databases_when_env_was_not_specified
  ActiveRecord::Tasks::DatabaseTasks.expects(:drop).
    with('database' => 'dev-db')
  ActiveRecord::Tasks::DatabaseTasks.expects(:drop).
    with('database' => 'test-db')
  ENV.expects(:[]).with('RAILS_ENV').returns(nil)

  ActiveRecord::Tasks::DatabaseTasks.drop_current(
    ActiveSupport::StringInquirer.new('development')
  )
end