Skip to content

Commit

Permalink
remove deprecate #all usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Apr 26, 2012
1 parent 5866321 commit b309963
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Expand Up @@ -123,7 +123,7 @@ def test_missing_data_in_a_nested_include_should_not_cause_errors_when_construct
assert_nothing_raised do
# @davey_mcdave doesn't have any author_favorites
includes = {:posts => :comments, :categorizations => :category, :author_favorites => :favorite_author }
Author.all :include => includes, :conditions => {:authors => {:name => @davey_mcdave.name}}, :order => 'categories.name'
Author.scoped(:includes => includes, :where => {:authors => {:name => @davey_mcdave.name}}, :order => 'categories.name').to_a
end
end
end
2 changes: 1 addition & 1 deletion activerecord/test/cases/finder_test.rb
Expand Up @@ -335,7 +335,7 @@ def test_find_with_hash_conditions_on_joined_table
end

def test_find_with_hash_conditions_on_joined_table_and_with_range
firms = DependentFirm.all :joins => :account, :conditions => {:name => 'RailsCore', :accounts => { :credit_limit => 55..60 }}
firms = DependentFirm.scoped :joins => :account, :where => {:name => 'RailsCore', :accounts => { :credit_limit => 55..60 }}
assert_equal 1, firms.size
assert_equal companies(:rails_core), firms.first
end
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/persistence_test.rb
Expand Up @@ -120,7 +120,7 @@ def test_increment_attribute_by

def test_destroy_all
conditions = "author_name = 'Mary'"
topics_by_mary = Topic.all(:conditions => conditions, :order => 'id')
topics_by_mary = Topic.scoped(:where => conditions, :order => 'id').to_a
assert ! topics_by_mary.empty?

assert_difference('Topic.count', -topics_by_mary.size) do
Expand Down
4 changes: 0 additions & 4 deletions activerecord/test/cases/relations_test.rb
Expand Up @@ -1126,10 +1126,6 @@ def test_intersection_with_array
assert_equal [rails_author], relation & [rails_author]
end

def test_removing_limit_with_options
assert_not_equal 1, Post.limit(1).all(:limit => nil).count
end

def test_primary_key
assert_equal "id", Post.scoped.primary_key
end
Expand Down

0 comments on commit b309963

Please sign in to comment.