diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-02-08 16:11:08 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-02-08 16:11:08 -0800 |
commit | 1ec25d15d9c2e19df0195165b99335a006d449b6 (patch) | |
tree | ef821bdc99f0ca56c0cc8171ad62734ab942a970 /actionpack/test/dispatch | |
parent | 3c8e0a47f942e435208b69d90a95eb8c6cea8cf9 (diff) | |
parent | ccd1c435ee646bdbdc54cba16ae3c7e6d504d2fb (diff) | |
download | rails-1ec25d15d9c2e19df0195165b99335a006d449b6.tar.gz rails-1ec25d15d9c2e19df0195165b99335a006d449b6.tar.bz2 rails-1ec25d15d9c2e19df0195165b99335a006d449b6.zip |
Merge pull request #13979 from mellowi/windows_disallowed_static_files_skipped
Skips tests on Windows that create files with illegal characters
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/static_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index 5bd1806b21..01cca69288 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -136,10 +136,15 @@ module StaticTests def with_static_file(file) path = "#{FIXTURE_LOAD_PATH}/#{public_path}" + file - File.open(path, "wb+") { |f| f.write(file) } + begin + File.open(path, "wb+") { |f| f.write(file) } + rescue Errno::EPROTO + skip "Couldn't create a file #{path}" + end + yield file ensure - File.delete(path) + File.delete(path) if File.exists? path end end |