diff options
Diffstat (limited to 'activerecord/test/cases/associations/join_model_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/join_model_test.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index 7a0427aabc..b1060d01af 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -510,13 +510,11 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase assert !author.comments.loaded? end - uses_mocha('has_many_through_collection_size_uses_counter_cache_if_it_exists') do - def test_has_many_through_collection_size_uses_counter_cache_if_it_exists - author = authors(:david) - author.stubs(:read_attribute).with('comments_count').returns(100) - assert_equal 100, author.comments.size - assert !author.comments.loaded? - end + def test_has_many_through_collection_size_uses_counter_cache_if_it_exists + author = authors(:david) + author.stubs(:read_attribute).with('comments_count').returns(100) + assert_equal 100, author.comments.size + assert !author.comments.loaded? end def test_adding_junk_to_has_many_through_should_raise_type_mismatch |