diff options
author | Xavier Noria <fxn@hashref.com> | 2012-08-22 23:10:33 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-08-22 23:10:33 +0200 |
commit | 8b16ff64f2ad4debd546314c3cd42b1f4bdbc9e8 (patch) | |
tree | 2fe99448f4a6421e8e317856a9b48b9b4356eb7d /activesupport/test/core_ext | |
parent | 79e880f7f4f90c5f31e1f2387165322df453f0b6 (diff) | |
download | rails-8b16ff64f2ad4debd546314c3cd42b1f4bdbc9e8.tar.gz rails-8b16ff64f2ad4debd546314c3cd42b1f4bdbc9e8.tar.bz2 rails-8b16ff64f2ad4debd546314c3cd42b1f4bdbc9e8.zip |
revises a brittle test in Active Support
The revised test assumed that the default permissions of a file
matched the umask of the process, but in the general case that
depends also on the file system. This test was failing in the
/vagrant shared folder of Rails development boxes.
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/file_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/file_test.rb b/activesupport/test/core_ext/file_test.rb index 128e956a8c..2c04e9687c 100644 --- a/activesupport/test/core_ext/file_test.rb +++ b/activesupport/test/core_ext/file_test.rb @@ -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 File.probe_stat_in(Dir.pwd).mode, file_mode assert_equal contents, File.read(file_name) ensure File.unlink(file_name) rescue nil |