diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 17:44:31 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 17:44:31 -0500 |
commit | 110c044e20b0fd72f191299b89327fa1b1552c63 (patch) | |
tree | 1b1b5f6ad445839985adc581e510a59de736add2 | |
parent | 582aa2ead58eacffca13e7efe94235958ee4db1b (diff) | |
download | rails-110c044e20b0fd72f191299b89327fa1b1552c63.tar.gz rails-110c044e20b0fd72f191299b89327fa1b1552c63.tar.bz2 rails-110c044e20b0fd72f191299b89327fa1b1552c63.zip |
Use delete if the rhs is nil
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index bade96fe17..1a3a6e86fa 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -239,7 +239,11 @@ class AssetTagHelperTest < ActionView::TestCase 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 |