2008-08-03 12:51:17 -07:00
|
|
|
require File.dirname(__FILE__) + '/../lib/couchrest'
|
2008-07-04 16:56:37 -07:00
|
|
|
|
2008-10-14 15:08:17 -07:00
|
|
|
FIXTURE_PATH = File.dirname(__FILE__) + '/fixtures'
|
|
|
|
|
2008-07-07 00:05:25 -07:00
|
|
|
COUCHHOST = "http://localhost:5984"
|
2008-11-08 16:28:58 -08: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
|