Sha256: 8d517db802d0592fc98fb551594ce71146a5bce2ff6cb7cf96ca5718aedd7b8a

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

#
# establishing the activerecord connection for all the tests
#

require 'rubygems'

#require_gem 'activerecord'
gem 'activerecord'
require 'active_record'


ActiveRecord::Base.establish_connection(
  :adapter => "mysql",
  :database => "test",
  :encoding => "utf8")
#ActiveRecord::Base.establish_connection(
#  :adapter => "sqlite3",
#  :dbfile => "test.db")

if "./#{ENV['TEST']}" == __FILE__

  require 'openwfe/extras/participants/activeparticipants'
  require 'openwfe/extras/expool/dberrorjournal'
  require 'openwfe/extras/expool/dbexpstorage'
  require 'openwfe/extras/expool/dbhistory'

  def bring_down (migration)
    begin
      migration.down
    rescue Exception => e
      puts
      puts "/// failed to bring down  #{migration.name} ///"
      puts
    end
  end

  bring_down OpenWFE::Extras::WorkitemTables
  bring_down OpenWFE::Extras::ProcessErrorTables
  bring_down OpenWFE::Extras::ExpressionTables
  bring_down OpenWFE::Extras::HistoryTables

  OpenWFE::Extras::WorkitemTables.up
  OpenWFE::Extras::ProcessErrorTables.up
  OpenWFE::Extras::ExpressionTables.up
  OpenWFE::Extras::HistoryTables.up
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.19 test/extras/active_connection.rb