Methods
- S
- T
Instance Public methods
setup()
Link
test_creates_configurations_with_blank_hosts()
Link
test_creates_configurations_with_local_host()
Link
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 128 def test_creates_configurations_with_local_host @configurations['development'].merge!('host' => 'localhost') ActiveRecord::Tasks::DatabaseTasks.expects(:create) ActiveRecord::Tasks::DatabaseTasks.create_all end
test_creates_configurations_with_local_ip()
Link
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 120 def test_creates_configurations_with_local_ip @configurations['development'].merge!('host' => '127.0.0.1') ActiveRecord::Tasks::DatabaseTasks.expects(:create) ActiveRecord::Tasks::DatabaseTasks.create_all end
test_ignores_configurations_without_databases()
Link
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 95 def test_ignores_configurations_without_databases @configurations['development'].merge!('database' => nil) ActiveRecord::Tasks::DatabaseTasks.expects(:create).never ActiveRecord::Tasks::DatabaseTasks.create_all end
test_ignores_remote_databases()
Link
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 103 def test_ignores_remote_databases @configurations['development'].merge!('host' => 'my.server.tld') $stderr.stubs(:puts).returns(nil) ActiveRecord::Tasks::DatabaseTasks.expects(:create).never ActiveRecord::Tasks::DatabaseTasks.create_all end
test_warning_for_remote_databases()
Link
# File activerecord/test/cases/tasks/database_tasks_test.rb, line 112 def test_warning_for_remote_databases @configurations['development'].merge!('host' => 'my.server.tld') $stderr.expects(:puts).with('This task only modifies local databases. my-db is on a remote host.') ActiveRecord::Tasks::DatabaseTasks.create_all end