aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-30 12:15:21 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-30 12:15:21 -0700
commitd5025f15d8ec753ebc03597a0a28f0e05575454e (patch)
treee2252c79077ac60477ae36c23df25cb2bee5a6ee /activesupport
parent61bb6c2eb77515c390326e3cfb4c5b789df74123 (diff)
parent7b6bf02303e91932fd3c5824e88f7a58424a7b60 (diff)
downloadrails-d5025f15d8ec753ebc03597a0a28f0e05575454e.tar.gz
rails-d5025f15d8ec753ebc03597a0a28f0e05575454e.tar.bz2
rails-d5025f15d8ec753ebc03597a0a28f0e05575454e.zip
Merge pull request #6541 from tjouan/tj/activesupport-fix-tests-requiring-unsafe-umask
Make tests pass with umask
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/core_ext/file_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/file_test.rb b/activesupport/test/core_ext/file_test.rb
index 50c9c57aa6..128e956a8c 100644
--- a/activesupport/test/core_ext/file_test.rb
+++ b/activesupport/test/core_ext/file_test.rb
@@ -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