From 93fdfc16e192015784e533099b5b9bd0b50c51e2 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Tue, 22 Jul 2008 00:11:45 +0000 Subject: [PATCH] ActionItem523: mocking the new method --- test/unit/assets_helper_test.rb | 3 +++ test/unit/communities_block_test.rb | 4 ++-- test/unit/enterprises_block_test.rb | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/unit/assets_helper_test.rb b/test/unit/assets_helper_test.rb index d483c89..a60ba37 100644 --- a/test/unit/assets_helper_test.rb +++ b/test/unit/assets_helper_test.rb @@ -19,6 +19,7 @@ class AssetsHelperTest < Test::Unit::TestCase end stubs(:_).returns('') + stubs(:__).returns('') stubs(:content_tag).returns('') generate_assets_menu end @@ -38,6 +39,7 @@ class AssetsHelperTest < Test::Unit::TestCase end stubs(:_).returns('') + stubs(:__).returns('') stubs(:content_tag).returns('') @category = mock @category.expects(:explode_path).returns(['my-category']).at_least_once @@ -65,6 +67,7 @@ class AssetsHelperTest < Test::Unit::TestCase expects(:link_to).with(anything, { :controller => 'search', :action => 'assets', :asset => 'enterprises', :category_path => [ 'my-category' ]}).never stubs(:_).returns('') + stubs(:__).returns('') stubs(:content_tag).returns('') @category = mock @category.expects(:explode_path).returns(['my-category']).at_least_once diff --git a/test/unit/communities_block_test.rb b/test/unit/communities_block_test.rb index 6632587..b8442bb 100644 --- a/test/unit/communities_block_test.rb +++ b/test/unit/communities_block_test.rb @@ -49,7 +49,7 @@ class CommunitiesBlockTest < Test::Unit::TestCase block = CommunitiesBlock.new block.expects(:owner).returns(profile) - expects(:_).with('All communities').returns('All communities') + expects(:__).with('All communities').returns('All communities') expects(:link_to).with('All communities', :controller => 'profile', :profile => 'theprofile', :action => 'communities') instance_eval(&block.footer) end @@ -59,7 +59,7 @@ class CommunitiesBlockTest < Test::Unit::TestCase block = CommunitiesBlock.new block.expects(:owner).returns(env) - expects(:_).with('All communities').returns('All communities') + expects(:__).with('All communities').returns('All communities') expects(:link_to).with('All communities', :controller => 'search', :action => 'assets', :asset => 'communities') instance_eval(&block.footer) diff --git a/test/unit/enterprises_block_test.rb b/test/unit/enterprises_block_test.rb index dc7ed53..5366cca 100644 --- a/test/unit/enterprises_block_test.rb +++ b/test/unit/enterprises_block_test.rb @@ -48,7 +48,7 @@ class EnterprisesBlockTest < Test::Unit::TestCase block = EnterprisesBlock.new block.expects(:owner).returns(profile) - expects(:_).with('All enterprises').returns('All enterprises') + expects(:__).with('All enterprises').returns('All enterprises') expects(:link_to).with('All enterprises', :controller => 'profile', :profile => 'theprofile', :action => 'enterprises') instance_eval(&block.footer) @@ -59,7 +59,7 @@ class EnterprisesBlockTest < Test::Unit::TestCase block = EnterprisesBlock.new block.expects(:owner).returns(env) - expects(:_).with('All enterprises').returns('All enterprises') + expects(:__).with('All enterprises').returns('All enterprises') expects(:link_to).with('All enterprises', :controller => 'search', :action => 'assets', :asset => 'enterprises') instance_eval(&block.footer) end -- libgit2 0.21.2