Permalink
Browse files

tests: initialise db connection before loading libertree/server

  • Loading branch information...
rekado committed Dec 2, 2012
1 parent dd9e141 commit 704b0ecc90e03ee8a9efd4a57a062e38e51b3269
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/spec_helper.rb
View
@@ -1,4 +1,14 @@
require 'ruby-debug'
require 'libertree/db'
########################
# FIXME: M4DBI wants us to connect to the db before defining models. As model
# definitions are loaded when 'libertree/server' is required, we have to do
# this first.
Libertree::DB.load_config "#{File.dirname( __FILE__ ) }/../database.yaml"
Libertree::DB.dbh
########################
require 'libertree/server'
require_relative 'factories'

0 comments on commit 704b0ec

Please sign in to comment.