diff options
Diffstat (limited to 'activerecord/test/cases/scoping')
-rw-r--r-- | activerecord/test/cases/scoping/default_scoping_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/scoping/default_scoping_test.rb b/activerecord/test/cases/scoping/default_scoping_test.rb index dcd09b6973..6679f9415b 100644 --- a/activerecord/test/cases/scoping/default_scoping_test.rb +++ b/activerecord/test/cases/scoping/default_scoping_test.rb @@ -5,6 +5,7 @@ require 'models/developer' require 'models/computer' require 'models/vehicle' require 'models/cat' +require 'active_support/core_ext/regexp' class DefaultScopingTest < ActiveRecord::TestCase fixtures :developers, :posts, :comments @@ -201,7 +202,7 @@ class DefaultScopingTest < ActiveRecord::TestCase def test_order_to_unscope_reordering scope = DeveloperOrderedBySalary.order('salary DESC, name ASC').reverse_order.unscope(:order) - assert !(scope.to_sql =~ /order/i) + assert !/order/i.match?(scope.to_sql) end def test_unscope_reverse_order |