aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_many_through_associations_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-26 18:32:55 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-26 18:32:55 +0100
commit75f03eca753f1e835409a80db1f54f716ef48d18 (patch)
tree6ef084ea2ee7b44c574096274ab6d5fa7a308235 /activerecord/test/cases/associations/has_many_through_associations_test.rb
parentb30996307d3b8d0d519c7ddcfa28fdeed428b602 (diff)
downloadrails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.gz
rails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.bz2
rails-75f03eca753f1e835409a80db1f54f716ef48d18.zip
remove calls to find(:first), find(:last) and find(:all)
Diffstat (limited to 'activerecord/test/cases/associations/has_many_through_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb
index 641194877b..1c06007d86 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -568,7 +568,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
def test_association_proxy_transaction_method_starts_transaction_in_association_class
Tag.expects(:transaction)
- Post.find(:first).tags.transaction do
+ Post.first.tags.transaction do
# nothing
end
end
@@ -651,7 +651,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
def test_collection_singular_ids_setter
company = companies(:rails_core)
- dev = Developer.find(:first)
+ dev = Developer.first
company.developer_ids = [dev.id]
assert_equal [dev], company.developers
@@ -671,7 +671,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
def test_collection_singular_ids_setter_raises_exception_when_invalid_ids_set
company = companies(:rails_core)
- ids = [Developer.find(:first).id, -9999]
+ ids = [Developer.first.id, -9999]
assert_raises(ActiveRecord::RecordNotFound) {company.developer_ids= ids}
end