[macruby-changes] [1757] MacRuby/branches/experimental/spec/frozen
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 5 16:23:30 PDT 2009
Revision: 1757
http://trac.macosforge.org/projects/ruby/changeset/1757
Author: lsansonetti at apple.com
Date: 2009-06-05 16:23:30 -0700 (Fri, 05 Jun 2009)
Log Message:
-----------
re-enabled the chown spec, it's all green
Added Paths:
-----------
MacRuby/branches/experimental/spec/frozen/core/file/chown_spec.rb
Removed Paths:
-------------
MacRuby/branches/experimental/spec/frozen/core/file/chown_spec_disabled.rb
MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/chown_tags.txt
Copied: MacRuby/branches/experimental/spec/frozen/core/file/chown_spec.rb (from rev 1754, MacRuby/branches/experimental/spec/frozen/core/file/chown_spec_disabled.rb)
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/file/chown_spec.rb (rev 0)
+++ MacRuby/branches/experimental/spec/frozen/core/file/chown_spec.rb 2009-06-05 23:23:30 UTC (rev 1757)
@@ -0,0 +1,130 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+as_superuser do
+ describe "File.chown" do
+ before :each do
+ @fname = tmp('file_chown_test')
+ File.open(@fname, 'w') { }
+ end
+
+ after :each do
+ File.delete @fname if File.exist? @fname
+ end
+
+ platform_is :windows do
+ it "does not modify the owner id of the file" do
+ File.chown 0, nil, @fname
+ File.stat(@fname).uid.should == 0
+ File.chown 501, nil, @fname
+ File.stat(@fname).uid.should == 0
+ end
+
+ it "does not modify the group id of the file" do
+ File.chown nil, 0, @fname
+ File.stat(@fname).gid.should == 0
+ File.chown nil, 501, @fname
+ File.stat(@fname).gid.should == 0
+ end
+ end
+
+ platform_is_not :windows do
+ it "changes the owner id of the file" do
+ File.chown 501, nil, @fname
+ File.stat(@fname).uid.should == 501
+ File.chown 0, nil, @fname
+ File.stat(@fname).uid.should == 0
+ end
+
+ it "changes the group id of the file" do
+ File.chown nil, 501, @fname
+ File.stat(@fname).gid.should == 501
+ File.chown nil, 0, @fname
+ File.stat(@fname).uid.should == 0
+ end
+
+ it "does not modify the owner id of the file if passed nil or -1" do
+ File.chown 501, nil, @fname
+ File.chown nil, nil, @fname
+ File.stat(@fname).uid.should == 501
+ File.chown nil, -1, @fname
+ File.stat(@fname).uid.should == 501
+ end
+
+ it "does not modify the group id of the file if passed nil or -1" do
+ File.chown nil, 501, @fname
+ File.chown nil, nil, @fname
+ File.stat(@fname).gid.should == 501
+ File.chown nil, -1, @fname
+ File.stat(@fname).gid.should == 501
+ end
+
+ it "returns the number of files processed" do
+ File.chown(nil, nil, @fname, @fname).should == 2
+ end
+ end
+ end
+
+ describe "File#chown" do
+ before :each do
+ @fname = tmp('file_chown_test')
+ @file = File.open(@fname, 'w')
+ end
+
+ after :each do
+ @file.close unless @file.closed?
+ File.delete @fname if File.exist? @fname
+ end
+
+ platform_is :windows do
+ it "does not modify the owner id of the file" do
+ File.chown 0, nil, @fname
+ File.stat(@fname).uid.should == 0
+ File.chown 501, nil, @fname
+ File.stat(@fname).uid.should == 0
+ end
+
+ it "does not modify the group id of the file" do
+ File.chown nil, 0, @fname
+ File.stat(@fname).gid.should == 0
+ File.chown nil, 501, @fname
+ File.stat(@fname).gid.should == 0
+ end
+ end
+
+ platform_is_not :windows do
+ it "changes the owner id of the file" do
+ @file.chown 501, nil
+ @file.stat.uid.should == 501
+ @file.chown 0, nil
+ @file.stat.uid.should == 0
+ end
+
+ it "changes the group id of the file" do
+ @file.chown nil, 501
+ @file.stat.gid.should == 501
+ @file.chown nil, 0
+ @file.stat.uid.should == 0
+ end
+
+ it "does not modify the owner id of the file if passed nil or -1" do
+ @file.chown 501, nil
+ @file.chown nil, nil
+ @file.stat.uid.should == 501
+ @file.chown nil, -1
+ @file.stat.uid.should == 501
+ end
+
+ it "does not modify the group id of the file if passed nil or -1" do
+ @file.chown nil, 501
+ @file.chown nil, nil
+ @file.stat.gid.should == 501
+ @file.chown nil, -1
+ @file.stat.gid.should == 501
+ end
+ end
+
+ it "returns 0" do
+ @file.chown(nil, nil).should == 0
+ end
+ end
+end
Deleted: MacRuby/branches/experimental/spec/frozen/core/file/chown_spec_disabled.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/file/chown_spec_disabled.rb 2009-06-05 23:23:11 UTC (rev 1756)
+++ MacRuby/branches/experimental/spec/frozen/core/file/chown_spec_disabled.rb 2009-06-05 23:23:30 UTC (rev 1757)
@@ -1,130 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-as_superuser do
- describe "File.chown" do
- before :each do
- @fname = tmp('file_chown_test')
- File.open(@fname, 'w') { }
- end
-
- after :each do
- File.delete @fname if File.exist? @fname
- end
-
- platform_is :windows do
- it "does not modify the owner id of the file" do
- File.chown 0, nil, @fname
- File.stat(@fname).uid.should == 0
- File.chown 501, nil, @fname
- File.stat(@fname).uid.should == 0
- end
-
- it "does not modify the group id of the file" do
- File.chown nil, 0, @fname
- File.stat(@fname).gid.should == 0
- File.chown nil, 501, @fname
- File.stat(@fname).gid.should == 0
- end
- end
-
- platform_is_not :windows do
- it "changes the owner id of the file" do
- File.chown 501, nil, @fname
- File.stat(@fname).uid.should == 501
- File.chown 0, nil, @fname
- File.stat(@fname).uid.should == 0
- end
-
- it "changes the group id of the file" do
- File.chown nil, 501, @fname
- File.stat(@fname).gid.should == 501
- File.chown nil, 0, @fname
- File.stat(@fname).uid.should == 0
- end
-
- it "does not modify the owner id of the file if passed nil or -1" do
- File.chown 501, nil, @fname
- File.chown nil, nil, @fname
- File.stat(@fname).uid.should == 501
- File.chown nil, -1, @fname
- File.stat(@fname).uid.should == 501
- end
-
- it "does not modify the group id of the file if passed nil or -1" do
- File.chown nil, 501, @fname
- File.chown nil, nil, @fname
- File.stat(@fname).gid.should == 501
- File.chown nil, -1, @fname
- File.stat(@fname).gid.should == 501
- end
-
- it "returns the number of files processed" do
- File.chown(nil, nil, @fname, @fname).should == 2
- end
- end
- end
-
- describe "File#chown" do
- before :each do
- @fname = tmp('file_chown_test')
- @file = File.open(@fname, 'w')
- end
-
- after :each do
- @file.close unless @file.closed?
- File.delete @fname if File.exist? @fname
- end
-
- platform_is :windows do
- it "does not modify the owner id of the file" do
- File.chown 0, nil, @fname
- File.stat(@fname).uid.should == 0
- File.chown 501, nil, @fname
- File.stat(@fname).uid.should == 0
- end
-
- it "does not modify the group id of the file" do
- File.chown nil, 0, @fname
- File.stat(@fname).gid.should == 0
- File.chown nil, 501, @fname
- File.stat(@fname).gid.should == 0
- end
- end
-
- platform_is_not :windows do
- it "changes the owner id of the file" do
- @file.chown 501, nil
- @file.stat.uid.should == 501
- @file.chown 0, nil
- @file.stat.uid.should == 0
- end
-
- it "changes the group id of the file" do
- @file.chown nil, 501
- @file.stat.gid.should == 501
- @file.chown nil, 0
- @file.stat.uid.should == 0
- end
-
- it "does not modify the owner id of the file if passed nil or -1" do
- @file.chown 501, nil
- @file.chown nil, nil
- @file.stat.uid.should == 501
- @file.chown nil, -1
- @file.stat.uid.should == 501
- end
-
- it "does not modify the group id of the file if passed nil or -1" do
- @file.chown nil, 501
- @file.chown nil, nil
- @file.stat.gid.should == 501
- @file.chown nil, -1
- @file.stat.gid.should == 501
- end
- end
-
- it "returns 0" do
- @file.chown(nil, nil).should == 0
- end
- end
-end
Deleted: MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/chown_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/chown_tags.txt 2009-06-05 23:23:11 UTC (rev 1756)
+++ MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/chown_tags.txt 2009-06-05 23:23:30 UTC (rev 1757)
@@ -1 +0,0 @@
-fails:An exception occurred during: loading /Users/eloy/Documents/DEVELOPMENT/MacRuby/git-svn-roxor/./spec/frozen/core/file/chown_spec.rb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090605/5ab750a7/attachment-0001.html>
More information about the macruby-changes
mailing list