aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/helper.rb6
-rw-r--r--activerecord/test/cases/relation_scoping_test.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index c05d588a54..adcfed56f9 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -72,8 +72,8 @@ module ActiveRecord
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)
@@ -81,7 +81,7 @@ module ActiveRecord
# 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
diff --git a/activerecord/test/cases/relation_scoping_test.rb b/activerecord/test/cases/relation_scoping_test.rb
index c65d073835..52dfea8fac 100644
--- a/activerecord/test/cases/relation_scoping_test.rb
+++ b/activerecord/test/cases/relation_scoping_test.rb
@@ -533,7 +533,7 @@ class DefaultScopingTest < ActiveRecord::TestCase
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 = []