Permalink
Browse files

Merge pull request #4343 from carlosantoniodasilva/activerecord-1.9-c…

…ompat

Activerecord 1.9 compat
  • Loading branch information...
2 parents 75a630e + a6a2670 commit 291ad6318fdd028292d47d05a99fdc059e3b2bfc @josevalim josevalim committed Jan 6, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 activerecord/test/cases/helper.rb
  2. +1 −1 activerecord/test/cases/relation_scoping_test.rb
@@ -72,16 +72,16 @@ class SQLCounter
attr_reader :ignore
- def initialize(ignore = self.class.ignored_sql)
- @ignore = ignore
+ def initialize(ignore = Regexp.union(self.class.ignored_sql))
+ @ignore = ignore
end
def call(name, start, finish, message_id, values)
sql = values[:sql]
# FIXME: this seems bad. we should probably have a better way to indicate
# the query was cached
- return if 'CACHE' == values[:name] || ignore.any? { |x| x =~ sql }
+ return if 'CACHE' == values[:name] || ignore =~ sql
self.class.log << sql
end
end
@@ -533,7 +533,7 @@ def test_default_scope_include_with_count
def test_default_scope_is_threadsafe
if in_memory_db?
- return skip "in memory db can't share a db between threads"
+ skip "in memory db can't share a db between threads"
end
threads = []

0 comments on commit 291ad63

Please sign in to comment.