diff options
author | Mikko Johansson <mikko.johansson@gmail.com> | 2014-02-09 02:02:44 +0200 |
---|---|---|
committer | Mikko Johansson <mikko.johansson@gmail.com> | 2014-02-09 02:02:44 +0200 |
commit | ccd1c435ee646bdbdc54cba16ae3c7e6d504d2fb (patch) | |
tree | 3b13d2a19b87dc3e25344a1d66f123ab1307e2e5 | |
parent | 3c2fe5ccc5e51c0c3133f471cb3f0ee882fabf54 (diff) | |
download | rails-ccd1c435ee646bdbdc54cba16ae3c7e6d504d2fb.tar.gz rails-ccd1c435ee646bdbdc54cba16ae3c7e6d504d2fb.tar.bz2 rails-ccd1c435ee646bdbdc54cba16ae3c7e6d504d2fb.zip |
Skips tests on Windows that create files with illegal characters
-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 |