[macruby-changes] [1758] MacRuby/branches/experimental/spec/frozen
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 5 16:26:29 PDT 2009
Revision: 1758
http://trac.macosforge.org/projects/ruby/changeset/1758
Author: lsansonetti at apple.com
Date: 2009-06-05 16:26:29 -0700 (Fri, 05 Jun 2009)
Log Message:
-----------
ditto for lchown spec (note: you must run mspec as root, as for the chown spec too)
Added Paths:
-----------
MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec.rb
Removed Paths:
-------------
MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec_disabled.rb
MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/lchown_tags.txt
Copied: MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec.rb (from rev 1754, MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec_disabled.rb)
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec.rb (rev 0)
+++ MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec.rb 2009-06-05 23:26:29 UTC (rev 1758)
@@ -0,0 +1,59 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+as_superuser do
+ describe "File.lchown" do
+ platform_is_not :windows do
+ before :each do
+ @fname = tmp('file_chown_test')
+ @lname = @fname + '.lnk'
+ File.delete @fname rescue nil
+ File.delete @lname rescue nil
+ File.open(@fname, 'w') { |f| f.chown 501, 501 }
+ File.symlink @fname, @lname
+ end
+
+ after :each do
+ File.delete @fname if File.exist? @fname
+ File.delete @lname if File.exist? @lname
+ end
+
+ it "changes the owner id of the file" do
+ File.lchown 502, nil, @lname
+ File.stat(@fname).uid.should == 501
+ File.lstat(@lname).uid.should == 502
+ File.lchown 0, nil, @lname
+ File.stat(@fname).uid.should == 501
+ File.lstat(@lname).uid.should == 0
+ end
+
+ it "changes the group id of the file" do
+ File.lchown nil, 502, @lname
+ File.stat(@fname).gid.should == 501
+ File.lstat(@lname).gid.should == 502
+ File.lchown nil, 0, @lname
+ File.stat(@fname).uid.should == 501
+ File.lstat(@lname).uid.should == 0
+ end
+
+ it "does not modify the owner id of the file if passed nil or -1" do
+ File.lchown 502, nil, @lname
+ File.lchown nil, nil, @lname
+ File.lstat(@lname).uid.should == 502
+ File.lchown nil, -1, @lname
+ File.lstat(@lname).uid.should == 502
+ end
+
+ it "does not modify the group id of the file if passed nil or -1" do
+ File.lchown nil, 502, @lname
+ File.lchown nil, nil, @lname
+ File.lstat(@lname).gid.should == 502
+ File.lchown nil, -1, @lname
+ File.lstat(@lname).gid.should == 502
+ end
+
+ it "returns the number of files processed" do
+ File.lchown(nil, nil, @lname, @lname).should == 2
+ end
+ end
+ end
+end
Deleted: MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec_disabled.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec_disabled.rb 2009-06-05 23:23:30 UTC (rev 1757)
+++ MacRuby/branches/experimental/spec/frozen/core/file/lchown_spec_disabled.rb 2009-06-05 23:26:29 UTC (rev 1758)
@@ -1,59 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-as_superuser do
- describe "File.lchown" do
- platform_is_not :windows do
- before :each do
- @fname = tmp('file_chown_test')
- @lname = @fname + '.lnk'
- File.delete @fname rescue nil
- File.delete @lname rescue nil
- File.open(@fname, 'w') { |f| f.chown 501, 501 }
- File.symlink @fname, @lname
- end
-
- after :each do
- File.delete @fname if File.exist? @fname
- File.delete @lname if File.exist? @lname
- end
-
- it "changes the owner id of the file" do
- File.lchown 502, nil, @lname
- File.stat(@fname).uid.should == 501
- File.lstat(@lname).uid.should == 502
- File.lchown 0, nil, @lname
- File.stat(@fname).uid.should == 501
- File.lstat(@lname).uid.should == 0
- end
-
- it "changes the group id of the file" do
- File.lchown nil, 502, @lname
- File.stat(@fname).gid.should == 501
- File.lstat(@lname).gid.should == 502
- File.lchown nil, 0, @lname
- File.stat(@fname).uid.should == 501
- File.lstat(@lname).uid.should == 0
- end
-
- it "does not modify the owner id of the file if passed nil or -1" do
- File.lchown 502, nil, @lname
- File.lchown nil, nil, @lname
- File.lstat(@lname).uid.should == 502
- File.lchown nil, -1, @lname
- File.lstat(@lname).uid.should == 502
- end
-
- it "does not modify the group id of the file if passed nil or -1" do
- File.lchown nil, 502, @lname
- File.lchown nil, nil, @lname
- File.lstat(@lname).gid.should == 502
- File.lchown nil, -1, @lname
- File.lstat(@lname).gid.should == 502
- end
-
- it "returns the number of files processed" do
- File.lchown(nil, nil, @lname, @lname).should == 2
- end
- end
- end
-end
Deleted: MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/lchown_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/lchown_tags.txt 2009-06-05 23:23:30 UTC (rev 1757)
+++ MacRuby/branches/experimental/spec/frozen/tags/macruby/core/file/lchown_tags.txt 2009-06-05 23:26:29 UTC (rev 1758)
@@ -1 +0,0 @@
-fails:An exception occurred during: loading /Users/eloy/Documents/DEVELOPMENT/MacRuby/git-svn-roxor/./spec/frozen/core/file/lchown_spec.rb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090605/54a47be4/attachment.html>
More information about the macruby-changes
mailing list