Sha256: aa735bfa6413f6a721903f8f949371f8dd54b7897915b7ab6430a319a5968973

Contents?: true

Size: 1.04 KB

Versions: 11

Compression:

Stored size: 1.04 KB

Contents

# In order to run these tests, you need to have a few things on your
# classpath. First, you're going to need the Sun File system
# context. You can get that here: 
#
# http://java.sun.com/products/jndi/serviceproviders.html.  
#
# Make sure that you put both the fscontext.jar and the
# providerutil.jar on your classpath.  
#
# To support the connection pooling in the test, you'll need
# commons-dbcp, commons-pool, and commons-collections.
#
# Finally, you'll need the jdbc driver, which is derby, for this test.

require 'models/auto_id'
require 'models/entry'
require 'db/jndi_config'
require 'simple'
require 'test/unit'
require 'logger'

class DerbyJndiTest < Test::Unit::TestCase
  include SimpleTestMethods
  alias_method :setup_simple, :setup
  def setup
    ActiveRecord::Base.establish_connection({ :jndi => 'jdbc/derbydb', :adapter => 'jdbc'})
    logger = Logger.new('jndi_test.log')
    logger.level = Logger::DEBUG
    ActiveRecord::Base.logger = logger
    setup_simple
  end
end

at_exit { 
  require 'fileutils'
  FileUtils.rm_rf 'derby-testdb'
}

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
ActiveRecord-JDBC-0.2.4 test/jndi_test.rb
ActiveRecord-JDBC-0.3 test/jndi_test.rb
ActiveRecord-JDBC-0.3.1 test/jndi_test.rb
ActiveRecord-JDBC-0.4 test/jndi_test.rb
ActiveRecord-JDBC-0.5 test/jndi_test.rb
activerecord-jdbc-adapter-0.7.2 test/jndi_test.rb
activerecord-jdbc-adapter-0.8.1 test/jndi_test.rb
activerecord-jdbc-adapter-0.8 test/jndi_test.rb
activerecord-jdbc-adapter-0.6 test/jndi_test.rb
activerecord-jdbc-adapter-0.7 test/jndi_test.rb
activerecord-jdbc-adapter-0.7.1 test/jndi_test.rb