aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/isolation
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/isolation')
-rw-r--r--railties/test/isolation/abstract_unit.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb
index 7522237a38..5b1c06d4e5 100644
--- a/railties/test/isolation/abstract_unit.rb
+++ b/railties/test/isolation/abstract_unit.rb
@@ -381,6 +381,21 @@ module TestHelpers
$:.reject! { |path| path =~ %r'/(#{to_remove.join('|')})/' }
end
+
+ def use_postgresql
+ File.open("#{app_path}/config/database.yml", "w") do |f|
+ f.puts <<-YAML
+ default: &default
+ adapter: postgresql
+ pool: 5
+ database: railties_test
+ development:
+ <<: *default
+ test:
+ <<: *default
+ YAML
+ end
+ end
end
end