Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "rubygems"
- require "spec"
- $TESTING = true
- puts "merb init called"
- require 'merb/merb_server'
- dir = File.dirname(__FILE__)
- Merb::Server.instance_eval {@@merb_raw_opts = []}
- Merb::Server.merb_config
- Merb::Server.config[:merb_root] = File.expand_path("#{dir}/../..")
- Merb::Server.config[:dist_root] = File.expand_path("#{dir}/../../dist")
- Merb::Server.config[:environment] = 'test'
- require 'merb'
- $LOAD_PATH << DIST_ROOT+"/app/models/"
- $LOAD_PATH << DIST_ROOT+"/app/controllers/"
- $LOAD_PATH << DIST_ROOT+"/app/helpers/"
- require DIST_ROOT+"/conf/merb_init"
- ActiveRecord::Base.establish_connection('test')
- !! then in merb_init.rb have:
- ActiveRecord::Base.configurations['test'] = {
- :adapter => 'mysql',
- :username => 'root',
- :password => 'xxxxxxx',
- :database => 'mrblog_test',
- :host => 'localhost'
- }
Add Comment
Please, Sign In to add comment