From 63861f760cec39df4e08fb1db6d2d44fff7e99b4 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Fri, 1 Aug 2008 22:53:49 +0000 Subject: [PATCH] ActionItem629: Debian etch porting --- app/models/my_network_block.rb | 2 +- test/unit/my_network_block_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/my_network_block.rb b/app/models/my_network_block.rb index 9b16a4c..208a3d2 100644 --- a/app/models/my_network_block.rb +++ b/app/models/my_network_block.rb @@ -16,7 +16,7 @@ class MyNetworkBlock < Block 'ul', content_tag('li', link_to(n_( 'One article published', '%d articles published', owner.articles.count) % owner.articles.count, owner.public_profile_url.merge(:action => 'sitemap') )) + content_tag('li', link_to(n__('One friend', '%d friends', owner.friends.count) % owner.friends.count, owner.public_profile_url.merge(:action => 'friends'))) + - content_tag('li', link_to(n__('One community', '%d communities', owner.communities.count) % owner.communities.count, owner.public_profile_url.merge(:action => 'communities'))) + + content_tag('li', link_to(n__('One community', '%d communities', owner.communities.size) % owner.communities.size, owner.public_profile_url.merge(:action => 'communities'))) + content_tag('li', link_to(n_('One tag', '%d tags', owner.tags.size) % owner.tags.size, owner.public_profile_url.merge(:action => 'tags'))) ) end diff --git a/test/unit/my_network_block_test.rb b/test/unit/my_network_block_test.rb index 13db1a8..bee7579 100644 --- a/test/unit/my_network_block_test.rb +++ b/test/unit/my_network_block_test.rb @@ -39,7 +39,7 @@ class MyNetworkBlockTest < ActiveSupport::TestCase should 'count communities' do mock_communities = mock owner.stubs(:communities).returns(mock_communities) - mock_communities.stubs(:count).returns(23) + mock_communities.stubs(:size).returns(23) assert_tag_in_string block.content, :tag => 'li', :descendant => { :tag => 'a', :content => '23 communities', :attributes => { :href => /\profile\/testuser\/communities/ }} end -- libgit2 0.21.2