Skip to content

Commit 09dd71d

Browse files
author
Anna
committed
updated scoping syntax
1 parent 70f474e commit 09dd71d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/cases/method_scoping_test_sqlserver.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class NestedScopingTest < ActiveRecord::TestCase
1515
# TODO update test for rails 4
1616
def test_coerced_test_merged_scoped_find
1717
poor_jamis = developers(:poor_jamis)
18-
Developer.send(:with_scope, :find => { :conditions => "salary < 100000" }) do
19-
Developer.send(:with_scope, :find => { :offset => 1, :order => 'id asc' }) do
18+
Developer.where("salary < 100000").scoping do
19+
Developer.offset(1).order('id asc').scoping do
2020
assert_sql /ORDER BY id asc/i do
2121
assert_equal(poor_jamis, Developer.order('id asc').first)
2222
end

0 commit comments

Comments
 (0)