From 99f5d74cc1ae8aab54d53d9c58ec2475959e6e5e Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Wed, 16 Mar 2016 13:56:13 -0300 Subject: [PATCH] restore ApplicationHelper.profile_image_link after test execution --- test/unit/profile_list_block_test.rb | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/test/unit/profile_list_block_test.rb b/test/unit/profile_list_block_test.rb index 76a6718..9d30792 100644 --- a/test/unit/profile_list_block_test.rb +++ b/test/unit/profile_list_block_test.rb @@ -33,6 +33,7 @@ class ProfileListBlockTest < ActiveSupport::TestCase block.stubs(:owner).returns(env) ApplicationHelper.class_eval do + alias_method :original_profile_image_link, :profile_image_link def profile_image_link( profile, size=:portrait, tag='li', extra_info = nil ) "<#{profile.name}>" end @@ -42,6 +43,9 @@ class ProfileListBlockTest < ActiveSupport::TestCase assert_match '', content assert_match '', content assert_match '', content + ApplicationHelper.class_eval do + alias_method :profile_image_link, :original_profile_image_link + end end should 'list private profiles' do -- libgit2 0.21.2