Use mode that works under windows
authorPeter Donald <donaldp@apache.org>
Sat, 20 Oct 2012 09:42:23 +0000 (09:42 +0000)
committerPeter Donald <donaldp@apache.org>
Sat, 20 Oct 2012 09:42:23 +0000 (09:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1400399 13f79535-47bb-0310-9956-ffa450edef68

spec/core/common_spec.rb

index 21e77c6..1538695 100644 (file)
@@ -542,10 +542,11 @@ describe Buildr::Filter do
 
   it 'should preserve mode bits except readable' do
     # legacy: pending "Pending the release of the fix for JRUBY-4927" if RUBY_PLATFORM =~ /java/
-    Dir['src/*'].each { |file| File.chmod(0o755, file) }
+    mode = 0o600
+    Dir['src/*'].each { |file| File.chmod(mode, file) }
     @filter.from('src').into('target').run
     Dir['target/*'].sort.each do |file|
-      (File.stat(file).mode & 0o755).should == 0o755
+      (File.stat(file).mode & mode).should == mode
     end
   end
 end