mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fixing Windows asset tag helper test failure
In asset_tag_helper_test.rb there is an assert on the number of bytes in a concatenated file. This test failed because Windows converts \n to \r\n as the default for "w". This is different than in *nix systems where there is no conversion done. THe test that failed was test_caching_stylesheet_link_tag_when_caching_on Using bin mode fixes this behavior on windows and makes no change on the *nix systems.
This commit is contained in:
@@ -16,7 +16,7 @@ class File
|
||||
require 'tempfile' unless defined?(Tempfile)
|
||||
require 'fileutils' unless defined?(FileUtils)
|
||||
|
||||
temp_file = Tempfile.new(basename(file_name), temp_dir)
|
||||
temp_file = Tempfile.new(basename(file_name), temp_dir, :binmode => true)
|
||||
yield temp_file
|
||||
temp_file.close
|
||||
|
||||
|
||||
Reference in New Issue
Block a user