Commit 99f5d74cc1ae8aab54d53d9c58ec2475959e6e5e

Authored by Joenio Costa
1 parent 1af11191

restore ApplicationHelper.profile_image_link after test execution

this avoid colateral errors in others tests

refers to commit: 1af11191ddb2da6ea93ea86ce7fbbb9a089feaf7
Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
test/unit/profile_list_block_test.rb
@@ -33,6 +33,7 @@ class ProfileListBlockTest < ActiveSupport::TestCase @@ -33,6 +33,7 @@ class ProfileListBlockTest < ActiveSupport::TestCase
33 block.stubs(:owner).returns(env) 33 block.stubs(:owner).returns(env)
34 34
35 ApplicationHelper.class_eval do 35 ApplicationHelper.class_eval do
  36 + alias_method :original_profile_image_link, :profile_image_link
36 def profile_image_link( profile, size=:portrait, tag='li', extra_info = nil ) 37 def profile_image_link( profile, size=:portrait, tag='li', extra_info = nil )
37 "<#{profile.name}>" 38 "<#{profile.name}>"
38 end 39 end
@@ -42,6 +43,9 @@ class ProfileListBlockTest &lt; ActiveSupport::TestCase @@ -42,6 +43,9 @@ class ProfileListBlockTest &lt; ActiveSupport::TestCase
42 assert_match '<testperson1>', content 43 assert_match '<testperson1>', content
43 assert_match '<testperson2>', content 44 assert_match '<testperson2>', content
44 assert_match '<testperson3>', content 45 assert_match '<testperson3>', content
  46 + ApplicationHelper.class_eval do
  47 + alias_method :profile_image_link, :original_profile_image_link
  48 + end
45 end 49 end
46 50
47 should 'list private profiles' do 51 should 'list private profiles' do