Commit 93fdfc16e192015784e533099b5b9bd0b50c51e2

Authored by AntonioTerceiro
1 parent d0444d5a

ActionItem523: mocking the new method



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2313 3f533792-8f58-4932-b0fe-aaf55b0a4547
test/unit/assets_helper_test.rb
... ... @@ -19,6 +19,7 @@ class AssetsHelperTest < Test::Unit::TestCase
19 19 end
20 20  
21 21 stubs(:_).returns('')
  22 + stubs(:__).returns('')
22 23 stubs(:content_tag).returns('')
23 24 generate_assets_menu
24 25 end
... ... @@ -38,6 +39,7 @@ class AssetsHelperTest < Test::Unit::TestCase
38 39 end
39 40  
40 41 stubs(:_).returns('')
  42 + stubs(:__).returns('')
41 43 stubs(:content_tag).returns('')
42 44 @category = mock
43 45 @category.expects(:explode_path).returns(['my-category']).at_least_once
... ... @@ -65,6 +67,7 @@ class AssetsHelperTest < Test::Unit::TestCase
65 67 expects(:link_to).with(anything, { :controller => 'search', :action => 'assets', :asset => 'enterprises', :category_path => [ 'my-category' ]}).never
66 68  
67 69 stubs(:_).returns('')
  70 + stubs(:__).returns('')
68 71 stubs(:content_tag).returns('')
69 72 @category = mock
70 73 @category.expects(:explode_path).returns(['my-category']).at_least_once
... ...
test/unit/communities_block_test.rb
... ... @@ -49,7 +49,7 @@ class CommunitiesBlockTest < Test::Unit::TestCase
49 49 block = CommunitiesBlock.new
50 50 block.expects(:owner).returns(profile)
51 51  
52   - expects(:_).with('All communities').returns('All communities')
  52 + expects(:__).with('All communities').returns('All communities')
53 53 expects(:link_to).with('All communities', :controller => 'profile', :profile => 'theprofile', :action => 'communities')
54 54 instance_eval(&block.footer)
55 55 end
... ... @@ -59,7 +59,7 @@ class CommunitiesBlockTest < Test::Unit::TestCase
59 59 block = CommunitiesBlock.new
60 60 block.expects(:owner).returns(env)
61 61  
62   - expects(:_).with('All communities').returns('All communities')
  62 + expects(:__).with('All communities').returns('All communities')
63 63 expects(:link_to).with('All communities', :controller => 'search', :action => 'assets', :asset => 'communities')
64 64  
65 65 instance_eval(&block.footer)
... ...
test/unit/enterprises_block_test.rb
... ... @@ -48,7 +48,7 @@ class EnterprisesBlockTest < Test::Unit::TestCase
48 48 block = EnterprisesBlock.new
49 49 block.expects(:owner).returns(profile)
50 50  
51   - expects(:_).with('All enterprises').returns('All enterprises')
  51 + expects(:__).with('All enterprises').returns('All enterprises')
52 52 expects(:link_to).with('All enterprises', :controller => 'profile', :profile => 'theprofile', :action => 'enterprises')
53 53  
54 54 instance_eval(&block.footer)
... ... @@ -59,7 +59,7 @@ class EnterprisesBlockTest < Test::Unit::TestCase
59 59 block = EnterprisesBlock.new
60 60 block.expects(:owner).returns(env)
61 61  
62   - expects(:_).with('All enterprises').returns('All enterprises')
  62 + expects(:__).with('All enterprises').returns('All enterprises')
63 63 expects(:link_to).with('All enterprises', :controller => 'search', :action => 'assets', :asset => 'enterprises')
64 64 instance_eval(&block.footer)
65 65 end
... ...