aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-07 17:44:31 -0500
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-07 17:44:31 -0500
commit110c044e20b0fd72f191299b89327fa1b1552c63 (patch)
tree1b1b5f6ad445839985adc581e510a59de736add2 /actionpack
parent582aa2ead58eacffca13e7efe94235958ee4db1b (diff)
downloadrails-110c044e20b0fd72f191299b89327fa1b1552c63.tar.gz
rails-110c044e20b0fd72f191299b89327fa1b1552c63.tar.bz2
rails-110c044e20b0fd72f191299b89327fa1b1552c63.zip
Use delete if the rhs is nil
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb6
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