Sha256: e2805e25fc6cd77afbf127dcb0a11ccc61925eecd8ccf3028478baa2c5e9f30e

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

require 'rubygems'
require 'test/unit'

require 'context'   # with github: gem install jeremymcanally-context
require 'matchy'    # best bet for now: clone from github and build yourself; when jeremy fixes matchy, jeremymcanally-matchy
require 'zebra'     # until jeremy updates matchy, download and build yourself, after that, with github: gem install giraffesoft-zebra

begin
  require 'ruby-debug'
  Debugger.start
rescue
  puts "no ruby-debug installed? REAlLY? ok, if that's how you roll..."
end

$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'lib/exegesis'

class Test::Unit::TestCase
  
  def fixtures_path fixtures
    File.join(File.dirname(__FILE__), 'fixtures', fixtures)
  end
  
  # todo: extract to some helper methods to include ala RR, etc
  def reset_db(name=nil)
    @db = CouchRest.database db(name) rescue nil
    @db.delete! rescue nil
    @db = CouchRest.database! db(name)
  end
  
  def teardown_db
    @db.delete! rescue nil
  end
  
  def db(name)
    "http://localhost:5984/exegesis-test#{name.nil? ? '' : "-#{name}"}"
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mattly-exegesis-0.0.10 test/test_helper.rb
mattly-exegesis-0.0.6 test/test_helper.rb
mattly-exegesis-0.0.7 test/test_helper.rb
mattly-exegesis-0.0.8 test/test_helper.rb
mattly-exegesis-0.0.9 test/test_helper.rb