From c6850d8361bbf288cf3adefd087cb9a4bc9c97bc Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 18 Jan 2010 00:03:18 +0530 Subject: Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too. --- activerecord/test/cases/named_scope_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index 6f84e12a49..09a657791e 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -345,14 +345,14 @@ class NamedScopeTest < ActiveRecord::TestCase def test_chaining_should_use_latest_conditions_when_searching # Normal hash conditions - assert_equal Topic.where(:approved => true).to_a, Topic.rejected.approved.all.to_a - assert_equal Topic.where(:approved => false).to_a, Topic.approved.rejected.all.to_a + assert_equal Topic.where(:approved => true).to_a, Topic.rejected.approved.all + assert_equal Topic.where(:approved => false).to_a, Topic.approved.rejected.all # Nested hash conditions with same keys - assert_equal [posts(:sti_comments)], Post.with_special_comments.with_very_special_comments.all.to_a + assert_equal [posts(:sti_comments)], Post.with_special_comments.with_very_special_comments.all # Nested hash conditions with different keys - assert_equal [posts(:sti_comments)], Post.with_special_comments.with_post(4).all.to_a.uniq + assert_equal [posts(:sti_comments)], Post.with_special_comments.with_post(4).all.uniq end def test_named_scopes_batch_finders -- cgit v1.2.3