Commit 99f5d74cc1ae8aab54d53d9c58ec2475959e6e5e
1 parent
1af11191
Exists in
web_steps_improvements
and in
9 other branches
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 | 33 | block.stubs(:owner).returns(env) |
| 34 | 34 | |
| 35 | 35 | ApplicationHelper.class_eval do |
| 36 | + alias_method :original_profile_image_link, :profile_image_link | |
| 36 | 37 | def profile_image_link( profile, size=:portrait, tag='li', extra_info = nil ) |
| 37 | 38 | "<#{profile.name}>" |
| 38 | 39 | end |
| ... | ... | @@ -42,6 +43,9 @@ class ProfileListBlockTest < ActiveSupport::TestCase |
| 42 | 43 | assert_match '<testperson1>', content |
| 43 | 44 | assert_match '<testperson2>', content |
| 44 | 45 | assert_match '<testperson3>', content |
| 46 | + ApplicationHelper.class_eval do | |
| 47 | + alias_method :profile_image_link, :original_profile_image_link | |
| 48 | + end | |
| 45 | 49 | end |
| 46 | 50 | |
| 47 | 51 | should 'list private profiles' do | ... | ... |