2008-12-19 11:09:20 +01:00
|
|
|
require "rubygems"
|
|
|
|
require "spec" # Satisfies Autotest and anyone else not using the Rake tasks
|
|
|
|
|
2008-08-03 21:51:17 +02:00
|
|
|
require File.dirname(__FILE__) + '/../lib/couchrest'
|
2008-07-05 01:56:37 +02:00
|
|
|
|
2008-10-15 00:08:17 +02:00
|
|
|
FIXTURE_PATH = File.dirname(__FILE__) + '/fixtures'
|
|
|
|
|
2008-12-14 12:05:02 +01:00
|
|
|
COUCHHOST = "http://127.0.0.1:5984"
|
2008-11-09 01:28:58 +01:00
|
|
|
TESTDB = 'couchrest-test'
|
|
|
|
|
|
|
|
def reset_test_db!
|
|
|
|
cr = CouchRest.new(COUCHHOST)
|
|
|
|
db = cr.database(TESTDB)
|
|
|
|
db.delete! rescue nil
|
|
|
|
db = cr.create_db(TESTDB) rescue nin
|
|
|
|
db
|
|
|
|
end
|