Permalink
Browse files

Skips tests on Windows that create files with illegal characters

  • Loading branch information...
1 parent 3c2fe5c commit ccd1c435ee646bdbdc54cba16ae3c7e6d504d2fb @mellowi mellowi committed Feb 9, 2014
Showing with 7 additions and 2 deletions.
  1. +7 −2 actionpack/test/dispatch/static_test.rb
@@ -136,10 +136,15 @@ def get(path)
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

0 comments on commit ccd1c43

Please sign in to comment.