diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-06-04 23:19:17 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-06-04 23:47:03 +0100 |
commit | 253bb6b9260938ed673e2c0059d729cffff4a523 (patch) | |
tree | cf8aa429645a0c73d32e8fe0eecf62a536488bdd /activerecord/test/connections/native_oracle | |
parent | cdce7ff191313bd99a31d26ddca5a5c8be766695 (diff) | |
download | rails-253bb6b9260938ed673e2c0059d729cffff4a523.tar.gz rails-253bb6b9260938ed673e2c0059d729cffff4a523.tar.bz2 rails-253bb6b9260938ed673e2c0059d729cffff4a523.zip |
Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
Diffstat (limited to 'activerecord/test/connections/native_oracle')
-rw-r--r-- | activerecord/test/connections/native_oracle/connection.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/activerecord/test/connections/native_oracle/connection.rb b/activerecord/test/connections/native_oracle/connection.rb deleted file mode 100644 index 99f921879c..0000000000 --- a/activerecord/test/connections/native_oracle/connection.rb +++ /dev/null @@ -1,35 +0,0 @@ -# uses oracle_enhanced adapter in ENV['ORACLE_ENHANCED_PATH'] or from github.com/rsim/oracle-enhanced.git -require 'active_record/connection_adapters/oracle_enhanced_adapter' - -# otherwise failed with silence_warnings method missing exception -require 'active_support/core_ext/kernel/reporting' - -print "Using Oracle\n" -require_dependency 'models/course' -require 'logger' - -ActiveRecord::Base.logger = Logger.new("debug.log") - -# Set these to your database connection strings -ENV['ARUNIT_DB_NAME'] ||= 'orcl' - -ActiveRecord::Base.configurations = { - 'arunit' => { - :adapter => 'oracle_enhanced', - :database => ENV['ARUNIT_DB_NAME'], - :username => 'arunit', - :password => 'arunit', - :emulate_oracle_adapter => true - }, - 'arunit2' => { - :adapter => 'oracle_enhanced', - :database => ENV['ARUNIT_DB_NAME'], - :username => 'arunit2', - :password => 'arunit2', - :emulate_oracle_adapter => true - } -} - -ActiveRecord::Base.establish_connection 'arunit' -Course.establish_connection 'arunit2' - |