mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #6541 from tjouan/tj/activesupport-fix-tests-requiring-unsafe-umask
Make tests pass with umask
This commit is contained in:
commit
d5025f15d8
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ class AtomicWriteTest < ActiveSupport::TestCase
|
|||
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 @@ class AtomicWriteTest < ActiveSupport::TestCase
|
|||
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 @@ class AtomicWriteTest < ActiveSupport::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue