diff options
author | Eric Allam <rubymaverick@gmail.com> | 2011-02-15 21:48:11 -0500 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-24 11:17:06 -0800 |
commit | 13547c16d97b5f52db11d9f48704bbea20b54a4c (patch) | |
tree | ef9daa907140d9dcf38c7eac4c8acae0cbb99535 /activerecord/test/cases | |
parent | 5f1fc0c8ac6e71bfb4d66da2005b1b0694e18446 (diff) | |
download | rails-13547c16d97b5f52db11d9f48704bbea20b54a4c.tar.gz rails-13547c16d97b5f52db11d9f48704bbea20b54a4c.tar.bz2 rails-13547c16d97b5f52db11d9f48704bbea20b54a4c.zip |
fixes: ActiveRecord::Base.scopes includes all scopes defined in all subclasses
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index d05b0ff947..fb050c3e52 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -64,6 +64,10 @@ class NamedScopeTest < ActiveRecord::TestCase assert Reply.scopes.include?(:base) assert_equal Reply.find(:all), Reply.base end + + def test_classes_dont_inherit_subclasses_scopes + assert !ActiveRecord::Base.scopes.include?(:base) + end def test_scopes_with_options_limit_finds_to_those_matching_the_criteria_specified assert !Topic.find(:all, :conditions => {:approved => true}).empty? |