diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-05 23:35:00 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-05 23:35:00 -0800 |
commit | 291ad6318fdd028292d47d05a99fdc059e3b2bfc (patch) | |
tree | 6c4b8d6626c8d8cd70ef37886c86551cc8988d92 /activerecord | |
parent | 75a630edf34d09bc57f3088136d418850abc4641 (diff) | |
parent | a6a26702439ce5a73d5391a73d135c1b4d921663 (diff) | |
download | rails-291ad6318fdd028292d47d05a99fdc059e3b2bfc.tar.gz rails-291ad6318fdd028292d47d05a99fdc059e3b2bfc.tar.bz2 rails-291ad6318fdd028292d47d05a99fdc059e3b2bfc.zip |
Merge pull request #4343 from carlosantoniodasilva/activerecord-1.9-compat
Activerecord 1.9 compat
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/helper.rb | 6 | ||||
-rw-r--r-- | activerecord/test/cases/relation_scoping_test.rb | 2 |
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 = [] |