summaryrefslogtreecommitdiff
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-03-11 01:12:23 -0700
committerelijah <elijah@riseup.net>2015-03-17 22:36:27 -0700
commit9266c3ac58404894539e25e514d8d8a6775c701f (patch)
tree3beaa846b37aecdf933763564710c2e1042c03a3 /test/test_helper.rb
parenta777c4c677e8cbd4f91c66a29ee1ecb347c5b8ab (diff)
add support for rotating tokens and sessions databases, and for a special tmp db for test users.
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 7959ddb..dfc6627 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -30,3 +30,12 @@ class ActiveSupport::TestCase
require 'i18n/missing_translations'
at_exit { I18n.missing_translations.dump }
end
+
+#
+# Create databases, since the temporary databases might not have been created
+# when `rake couchrest:migrate` was run.
+#
+
+Token.create_database! if Token.respond_to?(:create_database)
+CouchRest::Session::Document.create_database! if CouchRest::Session::Document.respond_to?(:create_database)
+User.create_tmp_database! if User.respond_to?(:create_tmp_database)