GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/zmack/mephisto.git
svenfuchs (author)
Wed Feb 20 11:11:20 -0800 2008
commit  1ad1b56b4a6c9284534b0afbb9d5d87715ae4312
tree    adc435b61f05728a991fd314188bc3e75cfb6038
parent  2772ec18227b04b3cb618748a2900a7b93b84d94
mephisto / vendor / plugins / engines_config / test / test_helper.rb
100644 26 lines (20 sloc) 0.92 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ENV['RAILS_ENV'] = 'test'
 
require 'test/unit'
require File.join(File.dirname(__FILE__), '../../../../config/boot')
 
Rails::Configuration.send(:define_method, :plugin_paths) do
  ["#{RAILS_ROOT}/vendor/plugins", "vendor/plugins/engines_config/test/plugins"]
end
 
require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment'))
 
Engines::Plugin::Config.set_table_name 'plugin_configs'
 
config = { :adapter => "sqlite3", :dbfile => File.dirname(__FILE__) + "/db/engines_config_plugin.sqlite3.db" }
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/log/debug.log")
ActiveRecord::Base.establish_connection(config)
 
unless ActiveRecord::Base.connection.tables.include?('plugin_configs')
  ActiveRecord::Schema.define(:version => 0) do
    create_table :plugin_configs, :force => true do |t|
      t.string "name"
      t.text "options"
      t.string "type"
    end
  end
end