Browse files

enhance unscoped tests

Make it obvious that using unscoped with another scope
without the block works
  • Loading branch information...
1 parent a1a2951 commit 36a45230dac4546b71b145681cf553a5a4f9eccb Neeraj Singh committed Mar 23, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 activerecord/test/cases/relation_scoping_test.rb
View
4 activerecord/test/cases/relation_scoping_test.rb
@@ -634,7 +634,11 @@ def test_unscoped_with_named_scope_should_not_have_default_scope
assert_equal [DeveloperCalledJamis.find(developers(:poor_jamis).id)], DeveloperCalledJamis.poor
assert DeveloperCalledJamis.unscoped.poor.include?(developers(:david).becomes(DeveloperCalledJamis))
+
+ assert_equal 11, DeveloperCalledJamis.unscoped.length
+ assert_equal 1, DeveloperCalledJamis.poor.length
assert_equal 10, DeveloperCalledJamis.unscoped.poor.length
+ assert_equal 10, DeveloperCalledJamis.unscoped { DeveloperCalledJamis.poor }.length
end
def test_default_scope_select_ignored_by_aggregations

0 comments on commit 36a4523

Please sign in to comment.