Permalink
Browse files

Allow asset tag tests to pass on windows

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent d137167 commit 92caa99eb39b1283159e22e3c2655eec9019f83b @NZKoz NZKoz committed May 6, 2007
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/test/template/asset_tag_helper_test.rb
@@ -165,7 +165,12 @@ def test_should_use_preset_asset_id
def test_preset_empty_asset_id
Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + "/../fixtures/")
+ # on windows, setting ENV["XXX"] to "" makes ENV["XXX"] return nil
+ if RUBY_PLATFORM =~ /win32/
+ ENV["RAILS_ASSET_ID"] = " "
+ else
ENV["RAILS_ASSET_ID"] = ""
+ end
assert_equal %(<img alt="Rails" src="/images/rails.png" />), image_tag("rails.png")
end

0 comments on commit 92caa99

Please sign in to comment.