couchrest_model/spec/spec_helper.rb

14 lines
319 B
Ruby
Raw Normal View History

2008-08-03 21:51:17 +02:00
require File.dirname(__FILE__) + '/../lib/couchrest'
2008-10-15 00:08:17 +02:00
FIXTURE_PATH = File.dirname(__FILE__) + '/fixtures'
2008-07-07 09:05:25 +02:00
COUCHHOST = "http://localhost: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