aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-18 00:03:18 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-18 00:03:18 +0530
commitc6850d8361bbf288cf3adefd087cb9a4bc9c97bc (patch)
treea0050bede3bb000f61e0d4e31b9319db10159287 /activerecord/test
parentdca3de3bc766175f49b56202246d3625c58fd763 (diff)
downloadrails-c6850d8361bbf288cf3adefd087cb9a4bc9c97bc.tar.gz
rails-c6850d8361bbf288cf3adefd087cb9a4bc9c97bc.tar.bz2
rails-c6850d8361bbf288cf3adefd087cb9a4bc9c97bc.zip
Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/named_scope_test.rb8
1 files changed, 4 insertions, 4 deletions
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