Actually, yeah, what you are seeing is the artifact of the big hack
that is db:test:clone_structure.
If you are using migrations, you can use them to create your test
database instead, and that will likely work much better with AR-JDBC.
Put the following snippet in a "jdbc.rake" file in your lib/tasks
directory and away you go. Let me know if this works for you.
/Nick
--- begin rake snippet
## Build the test database using migrations rather than dumping the
schema and loading fixtures
# Here we clear out prereqs and actions for the db:test:prepare task
so that it can be redefined
Rake::Task["db:test:prepare"].send :instance_variable_set,
"@prerequisites", FileList
Rake::Task["db:test:prepare"].send :instance_variable_set, "@actions",
namespace :db do
namespace :test do
task :prepare => %w(environment db:test:migrate_schema)
desc 'Use the migrations to create the test database'
task :migrate_schema => 'db:test:purge' do |t|
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])
ActiveRecord::Schema.verbose = t.application.options.trace
ActiveRecord::Migrator.migrate("db/migrate/")
end
end
end
--- end rake snippet