Skip to content
Browse files

Use delete if the rhs is nil

  • Loading branch information...
1 parent 582aa2e commit 110c044e20b0fd72f191299b89327fa1b1552c63 @jeremy jeremy committed Nov 7, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 actionpack/test/template/asset_tag_helper_test.rb
View
6 actionpack/test/template/asset_tag_helper_test.rb
@@ -239,7 +239,11 @@ def test_image_tag_windows_behaviour
File.stubs(:exist?).with('template/../fixtures/public/images/rails.png.').returns(true)
assert_equal '<img alt="Rails" src="/images/rails.png?1" />', image_tag('rails.png')
ensure
- ENV["RAILS_ASSET_ID"] = old_asset_id
+ if old_asset_id
+ ENV["RAILS_ASSET_ID"] = old_asset_id
+ else
+ ENV.delete("RAILS_ASSET_ID")
+ end
end
end

0 comments on commit 110c044

Please sign in to comment.
Something went wrong with that request. Please try again.