diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 17:44:31 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 21:19:02 -0500 |
commit | aaa2abf73fa39e0d455b4b781fb4d00e51d0bdc7 (patch) | |
tree | 8a61357f1d5d6b68cb3565afe3373d708a5498f4 /actionpack/test/template/asset_tag_helper_test.rb | |
parent | 1767c4b2da21379862a9ab1a4316d8da6b820a2a (diff) | |
download | rails-aaa2abf73fa39e0d455b4b781fb4d00e51d0bdc7.tar.gz rails-aaa2abf73fa39e0d455b4b781fb4d00e51d0bdc7.tar.bz2 rails-aaa2abf73fa39e0d455b4b781fb4d00e51d0bdc7.zip |
Use delete if the rhs is nil
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-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 |