Permalink
Browse files

Use octal to make it clearer what the value returned means.

  • Loading branch information...
1 parent 38d60cc commit 844bda7eedd46fdd5d7e0f08811577d8ce54397b @eventualbuddha eventualbuddha committed Jul 7, 2014
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/fakefs/file.rb
  2. +2 −2 test/file/stat_test.rb
View
@@ -329,11 +329,11 @@ def writable?
# World_writable and readable are platform dependent
# usually comparing with S_IROTH defined on compilation (MRI)
def world_writable?
- 511
+ 0777
end
def world_readable?
- 511
+ 0777
end
def nlink
View
@@ -119,13 +119,13 @@ def test_writing_to_file_modifies_mtime
def test_responds_to_world_writable
FileUtils.touch("/foo")
puts File::Stat.new("/foo").world_writable?
- assert File::Stat.new("/foo").world_writable? == 511
+ assert File::Stat.new("/foo").world_writable? == 0777
end
def test_responds_to_world_readable
FileUtils.touch("/foo")
puts File::Stat.new("/foo").world_readable?
- assert File::Stat.new("/foo").world_readable? == 511, "#{File::Stat.new("/foo").world_readable?}"
+ assert File::Stat.new("/foo").world_readable? == 0777, "#{File::Stat.new("/foo").world_readable?}"
end
def test_responds_to_world_readable

0 comments on commit 844bda7

Please sign in to comment.