Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6541 from tjouan/tj/activesupport-fix-tests-requi…

…ring-unsafe-umask

Make  tests pass with umask
  • Loading branch information...
commit d5025f15d8ec753ebc03597a0a28f0e05575454e 2 parents 61bb6c2 + 7b6bf02
Rafael Mendonça França rafaelfranca authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/test/core_ext/file_test.rb
6 activesupport/test/core_ext/file_test.rb
View
@@ -30,7 +30,7 @@ def test_atomic_write_preserves_file_permissions
assert File.exist?(file_name)
end
assert File.exist?(file_name)
- assert_equal 0100755, file_mode
+ assert_equal 0100755 & ~File.umask, file_mode
assert_equal contents, File.read(file_name)
File.atomic_write(file_name, Dir.pwd) do |file|
@@ -38,7 +38,7 @@ def test_atomic_write_preserves_file_permissions
assert File.exist?(file_name)
end
assert File.exist?(file_name)
- assert_equal 0100755, file_mode
+ assert_equal 0100755 & ~File.umask, file_mode
assert_equal contents, File.read(file_name)
ensure
File.unlink(file_name) rescue nil
@@ -51,7 +51,7 @@ def test_atomic_write_preserves_default_file_permissions
assert !File.exist?(file_name)
end
assert File.exist?(file_name)
- assert_equal 0100666 ^ File.umask, file_mode
+ assert_equal 0100666 & ~File.umask, file_mode
assert_equal contents, File.read(file_name)
ensure
File.unlink(file_name) rescue nil
Please sign in to comment.
Something went wrong with that request. Please try again.