From 278186534c0ccf285a20497461f40d2e54aa20a0 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 3 Feb 2009 18:25:37 -0800 Subject: Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. --- actionpack/test/template/asset_tag_helper_test.rb | 26 +++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'actionpack/test/template/asset_tag_helper_test.rb') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 5e2fc20167..32ad87c12d 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -228,20 +228,18 @@ class AssetTagHelperTest < ActionView::TestCase ImageLinkToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } end - uses_mocha 'test image tag with windows behaviour' do - def test_image_tag_windows_behaviour - old_asset_id, ENV["RAILS_ASSET_ID"] = ENV["RAILS_ASSET_ID"], "1" - # This simulates the behaviour of File#exist? on windows when testing a file ending in "." - # If the file "rails.png" exists, windows will return true when asked if "rails.png." exists (notice trailing ".") - # OS X, linux etc will return false in this case. - File.stubs(:exist?).with('template/../fixtures/public/images/rails.png.').returns(true) - assert_equal 'Rails', image_tag('rails.png') - ensure - if old_asset_id - ENV["RAILS_ASSET_ID"] = old_asset_id - else - ENV.delete("RAILS_ASSET_ID") - end + def test_image_tag_windows_behaviour + old_asset_id, ENV["RAILS_ASSET_ID"] = ENV["RAILS_ASSET_ID"], "1" + # This simulates the behaviour of File#exist? on windows when testing a file ending in "." + # If the file "rails.png" exists, windows will return true when asked if "rails.png." exists (notice trailing ".") + # OS X, linux etc will return false in this case. + File.stubs(:exist?).with('template/../fixtures/public/images/rails.png.').returns(true) + assert_equal 'Rails', image_tag('rails.png') + ensure + if old_asset_id + ENV["RAILS_ASSET_ID"] = old_asset_id + else + ENV.delete("RAILS_ASSET_ID") end end -- cgit v1.2.3