aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2009-06-05 18:45:09 +0300
committerRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2009-08-06 23:41:00 +0300
commit44a7ef85eba5491aaef5a890ef2b44b111888d35 (patch)
treeb8f415bd4c7f9b2655a6e3e4966283593e28f765 /activerecord/test
parent9b2309c4a8a8c8ad46658c170ccfdb828b30c443 (diff)
downloadrails-44a7ef85eba5491aaef5a890ef2b44b111888d35.tar.gz
rails-44a7ef85eba5491aaef5a890ef2b44b111888d35.tar.bz2
rails-44a7ef85eba5491aaef5a890ef2b44b111888d35.zip
modifications to Oracle connection.rb setup
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/connections/native_oracle/connection.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/activerecord/test/connections/native_oracle/connection.rb b/activerecord/test/connections/native_oracle/connection.rb
index 23e9f8f9c6..c8183dc0fb 100644
--- a/activerecord/test/connections/native_oracle/connection.rb
+++ b/activerecord/test/connections/native_oracle/connection.rb
@@ -1,8 +1,13 @@
# gem "rsim-activerecord-oracle_enhanced-adapter"
-gem "activerecord-oracle_enhanced-adapter", ">=1.2.0"
+# gem "activerecord-oracle_enhanced-adapter", ">=1.2.1"
# uses local copy of oracle_enhanced adapter
-# $:.unshift("../../oracle-enhanced/lib")
-# require 'active_record/connection_adapters/oracle_enhanced_adapter'
+$:.unshift("../../oracle-enhanced/lib")
+require 'active_record/connection_adapters/oracle_enhanced_adapter'
+# gem "activerecord-jdbc-adapter"
+# require 'active_record/connection_adapters/jdbc_adapter'
+
+# otherwise failed with silence_warnings method missing exception
+require 'active_support/core_ext/kernel/reporting'
print "Using Oracle\n"
require_dependency 'models/course'
@@ -20,6 +25,9 @@ ActiveRecord::Base.configurations = {
:adapter => 'oracle_enhanced',
:database => db,
:host => "localhost", # used just by JRuby to construct JDBC connect string
+ # :adapter => "jdbc",
+ # :driver => "oracle.jdbc.driver.OracleDriver",
+ # :url => "jdbc:oracle:thin:@localhost:1521:#{db}",
:username => 'arunit',
:password => 'arunit',
:emulate_oracle_adapter => true
@@ -28,6 +36,9 @@ ActiveRecord::Base.configurations = {
:adapter => 'oracle_enhanced',
:database => db,
:host => "localhost", # used just by JRuby to construct JDBC connect string
+ # :adapter => "jdbc",
+ # :driver => "oracle.jdbc.driver.OracleDriver",
+ # :url => "jdbc:oracle:thin:@localhost:1521:#{db}",
:username => 'arunit2',
:password => 'arunit2',
:emulate_oracle_adapter => true
@@ -37,6 +48,9 @@ ActiveRecord::Base.configurations = {
ActiveRecord::Base.establish_connection 'arunit'
Course.establish_connection 'arunit2'
+# ActiveRecord::Base.connection.execute %q{alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'}
+# ActiveRecord::Base.connection.execute %q{alter session set nls_timestamp_format = 'YYYY-MM-DD HH24:MI:SS'} rescue nil
+
# for assert_queries test helper
ActiveRecord::Base.connection.class.class_eval do
IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from all_tab_columns/im]