aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorPaul Nikitochkin <paul.nikitochkin@gmail.com>2013-07-05 02:06:35 +0300
committerPaul Nikitochkin <paul.nikitochkin@gmail.com>2013-07-05 02:08:55 +0300
commit1894682cf799500f3a5f966145924fa0660b71c8 (patch)
tree5d5340e015481331f3b9df2c5c494f1e9418d4d2 /activerecord
parentf3f46a6f4ac2a1fd2dd6fa9af245641f32c9bc59 (diff)
downloadrails-1894682cf799500f3a5f966145924fa0660b71c8.tar.gz
rails-1894682cf799500f3a5f966145924fa0660b71c8.tar.bz2
rails-1894682cf799500f3a5f966145924fa0660b71c8.zip
Cleanup belongs to tests
simplified logic to calculate number of queries by using assert_queries
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index 95896971a8..cc72ab7b2a 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -391,8 +391,7 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
def test_dont_find_target_when_foreign_key_is_null
tagging = taggings(:thinking_general)
- queries = assert_sql { tagging.super_tag }
- assert_equal 0, queries.length
+ assert_queries(0) { tagging.super_tag }
end
def test_field_name_same_as_foreign_key