Ruby 1.9 compat, consistent load paths

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper
2007-10-02 05:32:14 +00:00
parent 9264bdc8f6
commit 0ee1cb2cd3
69 changed files with 307 additions and 278 deletions

View File

@@ -60,9 +60,8 @@ rescue LoadError
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
end
ActiveRecord::Base.connection.class.class_eval do
if not (const_get('IGNORED_SQL') rescue nil)
ActiveRecord::Base.connection.class.class_eval do
unless defined? IGNORED_SQL
IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/]
def execute_with_counting(sql, name = nil, &block)