Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

r2992@asus: jeremy | 2005-07-10 02:43:49 -0700

 Skip ActiveRecordStore tests if neither SQLite 2 nor 3 is available.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit c697be5b696fb3f49545aca12b35ac7feee05925 1 parent 6049977
@jeremy jeremy authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 actionpack/test/controller/active_record_store_test.rb
View
10 actionpack/test/controller/active_record_store_test.rb
@@ -18,8 +18,14 @@
CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite3', :dbfile => ':memory:')
CGI::Session::ActiveRecordStore::Session.connection
rescue Object
- $stderr.puts 'SQLite 3 unavailable; falling to SQLite 2.'
- CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite', :dbfile => ':memory:')
+ $stderr.puts 'SQLite 3 unavailable; falling back to SQLite 2.'
+ begin
+ CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite', :dbfile => ':memory:')
+ CGI::Session::ActiveRecordStore::Session.connection
+ rescue Object
+ $stderr.puts 'SQLite 2 unavailable; skipping ActiveRecordStore test suite.'
+ raise SystemExit
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.