diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-22 09:19:55 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-22 09:19:55 +0000 |
commit | 767eaa9df13549037f053c89a0a0d334b3086873 (patch) | |
tree | d545bf8975c9d57e209b1d2fb0a41bbeeaaba044 /actionpack/test/activerecord/active_record_store_test.rb | |
parent | 8f89f14fc80af58c1cebb84342cf109aebc858a1 (diff) | |
download | rails-767eaa9df13549037f053c89a0a0d334b3086873.tar.gz rails-767eaa9df13549037f053c89a0a0d334b3086873.tar.bz2 rails-767eaa9df13549037f053c89a0a0d334b3086873.zip |
Clean up and run the Active Record integration tests by default. Closes #5854.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4807 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/activerecord/active_record_store_test.rb')
-rw-r--r-- | actionpack/test/activerecord/active_record_store_test.rb | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb index f85bdeb466..3bb37a2274 100644 --- a/actionpack/test/activerecord/active_record_store_test.rb +++ b/actionpack/test/activerecord/active_record_store_test.rb @@ -1,33 +1,8 @@ -# Unfurl the safety net. -path_to_ar = File.dirname(__FILE__) + '/../../../activerecord' -if Object.const_defined?(:ActiveRecord) or File.exist?(path_to_ar) - begin - # These tests exercise CGI::Session::ActiveRecordStore, so you're going to # need AR in a sibling directory to AP and have SQLite installed. - -unless Object.const_defined?(:ActiveRecord) - require File.join(path_to_ar, 'lib', 'active_record') -end - -require File.dirname(__FILE__) + '/../abstract_unit' +require File.dirname(__FILE__) + '/../active_record_unit' require 'action_controller/session/active_record_store' -#ActiveRecord::Base.logger = Logger.new($stdout) -begin - CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite3', :database => ':memory:') - CGI::Session::ActiveRecordStore::Session.connection -rescue Object - $stderr.puts 'SQLite 3 unavailable; falling back to SQLite 2.' - begin - CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite', :database => ':memory:') - CGI::Session::ActiveRecordStore::Session.connection - rescue Object - $stderr.puts 'SQLite 2 unavailable; skipping ActiveRecordStore test suite.' - raise SystemExit - end -end - module CommonActiveRecordStoreTests def test_basics @@ -165,11 +140,3 @@ class SqlBypassActiveRecordStoreTest < ActiveRecordStoreTest assert_equal({ 'foo' => 'bar' }, @new_session.model.data) end end - - -# End of safety net. - rescue Object => e - $stderr.puts "Skipping CGI::Session::ActiveRecordStore tests: #{e}" - #$stderr.puts " #{e.backtrace.join("\n ")}" - end -end |