Sha256: d92fa2525b6fa467c1d1bd17ae53108523b77d56ba00da81cf97945831ff2785

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

# This file contains og initialization code for all tests. 
# This way you only change the parameters in one file in 
# order to run all the tests for many stores.
#
# Current store choices are
#  :mysql :psql :sqlite :kirby :memory

# CHANGE THIS TO SETUP MOST TESTS

configA = :mysql

# FOR MULTI-TESTS

configB = :mysql  

# SET THIS TO true TO ENABLE EXTRA DEBUG CODE

debug = false

# TO TEST AGAINST AN INSTALLATION OF OG INSTEAD THIS LOCAL 
# DISTRIBUTION, SET THE FOLLOWING TO true.

test_against_installation = false


#--------------------------------------------------------------
# DO NOT CHANGE ANYTHING BELOW THIS LINE

unless test_against_installation
  $:.unshift File.expand_path( File.join( File.dirname(__FILE__), '..', '..', 'lib' ) )
end

$DBG = debug

og_mysql = {
  :destroy => true,
  :adapter => :mysql,
  :user => 'root',
  :name => 'test',
# :password => 'gmrulez',
# :socket => '/var/run/mysqld/mysqld.sock'
}

og_psql = {
  :destroy => true,
  :adapter => :postgresql,
  :user => 'postgres',
  :password => 'postgres',
  :name => 'test'
}

og_sqlite = {
  :destroy => true,
  :adapter => :sqlite,
  :name => 'test'
}

og_kirby = {
  :destroy => true,
  :adapter => :kirby,
  :name => 'test',
  :embedded => true
}

og_memory = {
  :adapter => :memory,
  :name => :test,
  :destroy => true
}  

# This sets the common global vars to be used by the tests.

eval %{
  @og_config1 = og_config = og_#{configA}
  @og_config2 = og_#{configB}
}

require 'stringio'
require 'glue'
require 'glue/logger'
require 'og'

Logger.get.level = Logger::WARN unless $DBG

$og1 ||= Og.start(@og_config1)
$og2 ||= Og.start(@og_config2)

Og.thread_safe = false if Og.thread_safe

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
og-0.41.0 test/og/CONFIG.rb