Skip to content

Commit

Permalink
default_scope with a hash is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Apr 26, 2012
1 parent 848276d commit 519001d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions activerecord/test/cases/named_scope_test.rb
Expand Up @@ -465,16 +465,6 @@ def test_eager_scopes_are_deprecated
assert_equal [posts(:welcome).title], klass.welcome_2.map(&:title)
end

def test_eager_default_scope_hashes_are_not_deprecated
klass = Class.new(ActiveRecord::Base)
klass.table_name = 'posts'

assert_not_deprecated do
klass.send(:default_scope, :conditions => { :id => posts(:welcome).id })
end
assert_equal [posts(:welcome).title], klass.all.map(&:title)
end

def test_eager_default_scope_relations_are_deprecated
klass = Class.new(ActiveRecord::Base)
klass.table_name = 'posts'
Expand Down

0 comments on commit 519001d

Please sign in to comment.