diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-18 04:38:19 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-18 04:38:19 +0530 |
commit | d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914 (patch) | |
tree | 0189bf9fe9888963df51987e5e330b09e2e19b59 /activerecord/test/cases | |
parent | e1d507c7fb541d29d57d152f40e3a539e70781d0 (diff) | |
download | rails-d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914.tar.gz rails-d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914.tar.bz2 rails-d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914.zip |
Rename named_scope to scope
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index ce1ac845cd..3e2bd58f9a 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -372,9 +372,13 @@ class NamedScopeTest < ActiveRecord::TestCase def test_named_scopes_with_reserved_names [:where, :with_scope].each do |protected_method| - assert_raises(ArgumentError) { Topic.named_scope protected_method } + assert_raises(ArgumentError) { Topic.scope protected_method } end end + + def test_deprecated_named_scope_method + assert_deprecated('named_scope has been deprecated') { Topic.named_scope :deprecated_named_scope } + end end class DynamicScopeMatchTest < ActiveRecord::TestCase |