Permalink
Browse files

Perfer to define methods instead of calling test

This file is using this pattern already
  • Loading branch information...
1 parent 8116411 commit d10e2ca9f199105849444b39f55d4922339d9c8d @rafaelfranca rafaelfranca committed Apr 22, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -1082,7 +1082,7 @@ def test_has_many_through_obeys_order_on_through_association
assert_equal ["parrot", "bulbul"], owner.toys.map { |r| r.pet.name }
end
- test "has many through associations on new records use null relations" do
+ def test_has_many_through_associations_on_new_records_use_null_relations
person = Person.new
assert_no_queries do
@@ -1094,19 +1094,19 @@ def test_has_many_through_obeys_order_on_through_association
end
end
- test "has many through with default scope on the target" do
+ def test_has_many_through_with_default_scope_on_the_target
person = people(:michael)
assert_equal [posts(:thinking)], person.first_posts
readers(:michael_authorless).update(first_post_id: 1)
assert_equal [posts(:thinking)], person.reload.first_posts
end
- test "has many through with includes in through association scope" do
+ def test_has_many_through_with_includes_in_through_association_scope
assert_not_empty posts(:welcome).author_address_extra_with_address
end
- test "insert records via has_many_through association with scope" do
+ def test_insert_records_via_has_many_through_association_with_scope
club = Club.create!
member = Member.create!
Membership.create!(club: club, member: member)

0 comments on commit d10e2ca

Please sign in to comment.