summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/file/stat
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/file/stat')
-rw-r--r--spec/rubyspec/core/file/stat/atime_spec.rb18
-rw-r--r--spec/rubyspec/core/file/stat/birthtime_spec.rb27
-rw-r--r--spec/rubyspec/core/file/stat/blksize_spec.rb27
-rw-r--r--spec/rubyspec/core/file/stat/blockdev_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/blocks_spec.rb27
-rw-r--r--spec/rubyspec/core/file/stat/chardev_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/comparison_spec.rb66
-rw-r--r--spec/rubyspec/core/file/stat/ctime_spec.rb18
-rw-r--r--spec/rubyspec/core/file/stat/dev_major_spec.rb23
-rw-r--r--spec/rubyspec/core/file/stat/dev_minor_spec.rb23
-rw-r--r--spec/rubyspec/core/file/stat/dev_spec.rb15
-rw-r--r--spec/rubyspec/core/file/stat/directory_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/executable_real_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/executable_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/file_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/fixtures/classes.rb5
-rw-r--r--spec/rubyspec/core/file/stat/ftype_spec.rb68
-rw-r--r--spec/rubyspec/core/file/stat/gid_spec.rb19
-rw-r--r--spec/rubyspec/core/file/stat/grpowned_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/ino_spec.rb38
-rw-r--r--spec/rubyspec/core/file/stat/inspect_spec.rb26
-rw-r--r--spec/rubyspec/core/file/stat/mode_spec.rb19
-rw-r--r--spec/rubyspec/core/file/stat/mtime_spec.rb18
-rw-r--r--spec/rubyspec/core/file/stat/new_spec.rb30
-rw-r--r--spec/rubyspec/core/file/stat/nlink_spec.rb21
-rw-r--r--spec/rubyspec/core/file/stat/owned_spec.rb31
-rw-r--r--spec/rubyspec/core/file/stat/pipe_spec.rb32
-rw-r--r--spec/rubyspec/core/file/stat/rdev_major_spec.rb31
-rw-r--r--spec/rubyspec/core/file/stat/rdev_minor_spec.rb31
-rw-r--r--spec/rubyspec/core/file/stat/rdev_spec.rb15
-rw-r--r--spec/rubyspec/core/file/stat/readable_real_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/readable_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/setgid_spec.rb11
-rw-r--r--spec/rubyspec/core/file/stat/setuid_spec.rb11
-rw-r--r--spec/rubyspec/core/file/stat/size_spec.rb21
-rw-r--r--spec/rubyspec/core/file/stat/socket_spec.rb11
-rw-r--r--spec/rubyspec/core/file/stat/sticky_spec.rb11
-rw-r--r--spec/rubyspec/core/file/stat/symlink_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/uid_spec.rb18
-rw-r--r--spec/rubyspec/core/file/stat/world_readable_spec.rb11
-rw-r--r--spec/rubyspec/core/file/stat/world_writable_spec.rb11
-rw-r--r--spec/rubyspec/core/file/stat/writable_real_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/writable_spec.rb7
-rw-r--r--spec/rubyspec/core/file/stat/zero_spec.rb7
44 files changed, 0 insertions, 824 deletions
diff --git a/spec/rubyspec/core/file/stat/atime_spec.rb b/spec/rubyspec/core/file/stat/atime_spec.rb
deleted file mode 100644
index 575c98ce44..0000000000
--- a/spec/rubyspec/core/file/stat/atime_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#atime" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns the atime of a File::Stat object" do
- st = File.stat(@file)
- st.atime.should be_kind_of(Time)
- st.atime.should <= Time.now
- end
-end
diff --git a/spec/rubyspec/core/file/stat/birthtime_spec.rb b/spec/rubyspec/core/file/stat/birthtime_spec.rb
deleted file mode 100644
index c2ccc319f1..0000000000
--- a/spec/rubyspec/core/file/stat/birthtime_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#birthtime" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- platform_is :windows, :darwin, :freebsd, :netbsd do
- it "returns the birthtime of a File::Stat object" do
- st = File.stat(@file)
- st.birthtime.should be_kind_of(Time)
- st.birthtime.should <= Time.now
- end
- end
-
- platform_is :linux, :openbsd do
- it "raises an NotImplementedError" do
- st = File.stat(@file)
- lambda { st.birthtime }.should raise_error(NotImplementedError)
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/blksize_spec.rb b/spec/rubyspec/core/file/stat/blksize_spec.rb
deleted file mode 100644
index 4399e6b4bb..0000000000
--- a/spec/rubyspec/core/file/stat/blksize_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#blksize" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- platform_is_not :windows do
- it "returns the blksize of a File::Stat object" do
- st = File.stat(@file)
- st.blksize.is_a?(Integer).should == true
- st.blksize.should > 0
- end
- end
-
- platform_is :windows do
- it "returns nil" do
- st = File.stat(@file)
- st.blksize.should == nil
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/blockdev_spec.rb b/spec/rubyspec/core/file/stat/blockdev_spec.rb
deleted file mode 100644
index 440291f130..0000000000
--- a/spec/rubyspec/core/file/stat/blockdev_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/blockdev', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#blockdev?" do
- it_behaves_like :file_blockdev, :blockdev?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/blocks_spec.rb b/spec/rubyspec/core/file/stat/blocks_spec.rb
deleted file mode 100644
index ca0fd2c8a6..0000000000
--- a/spec/rubyspec/core/file/stat/blocks_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#blocks" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- platform_is_not :windows do
- it "returns the blocks of a File::Stat object" do
- st = File.stat(@file)
- st.blocks.is_a?(Integer).should == true
- st.blocks.should > 0
- end
- end
-
- platform_is :windows do
- it "returns nil" do
- st = File.stat(@file)
- st.blocks.should be_nil
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/chardev_spec.rb b/spec/rubyspec/core/file/stat/chardev_spec.rb
deleted file mode 100644
index 25c8c877f7..0000000000
--- a/spec/rubyspec/core/file/stat/chardev_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/chardev', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#chardev?" do
- it_behaves_like :file_chardev, :chardev?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/comparison_spec.rb b/spec/rubyspec/core/file/stat/comparison_spec.rb
deleted file mode 100644
index a70a083ab2..0000000000
--- a/spec/rubyspec/core/file/stat/comparison_spec.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#<=>" do
- before :each do
- @name1 = tmp("i_exist")
- @name2 = tmp("i_exist_too")
- touch @name1
- touch @name2
- end
-
- after :each do
- rm_r @name1, @name2
- end
-
- it "is able to compare files by the same modification times" do
- now = Time.now - 1 # 1 second ago to avoid NFS cache issue
- File.utime(now, now, @name1)
- File.utime(now, now, @name2)
-
- File.open(@name1) { |file1|
- File.open(@name2) { |file2|
- (file1.stat <=> file2.stat).should == 0
- }
- }
- end
-
- it "is able to compare files by different modification times" do
- now = Time.now
- File.utime(now, now + 100, @name2)
-
- File.open(@name1) { |file1|
- File.open(@name2) { |file2|
- (file1.stat <=> file2.stat).should == -1
- }
- }
-
- File.utime(now, now - 100, @name2)
-
- File.open(@name1) { |file1|
- File.open(@name2) { |file2|
- (file1.stat <=> file2.stat).should == 1
- }
- }
- end
-
- # TODO: Fix
- it "includes Comparable and #== shows mtime equality between two File::Stat objects" do
- File.open(@name1) { |file1|
- File.open(@name2) { |file2|
- (file1.stat == file1.stat).should == true
- (file2.stat == file2.stat).should == true
- }
- }
-
- now = Time.now
- File.utime(now, now + 100, @name2)
-
- File.open(@name1) { |file1|
- File.open(@name2) { |file2|
- (file1.stat == file2.stat).should == false
- (file1.stat == file1.stat).should == true
- (file2.stat == file2.stat).should == true
- }
- }
- end
-end
diff --git a/spec/rubyspec/core/file/stat/ctime_spec.rb b/spec/rubyspec/core/file/stat/ctime_spec.rb
deleted file mode 100644
index 2f82dfdab6..0000000000
--- a/spec/rubyspec/core/file/stat/ctime_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#ctime" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns the ctime of a File::Stat object" do
- st = File.stat(@file)
- st.ctime.should be_kind_of(Time)
- st.ctime.should <= Time.now
- end
-end
diff --git a/spec/rubyspec/core/file/stat/dev_major_spec.rb b/spec/rubyspec/core/file/stat/dev_major_spec.rb
deleted file mode 100644
index 0b00fc4d36..0000000000
--- a/spec/rubyspec/core/file/stat/dev_major_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#dev_major" do
- before :each do
- @name = tmp("file.txt")
- touch(@name)
- end
- after :each do
- rm_r @name
- end
-
- platform_is_not :windows do
- it "returns the major part of File::Stat#dev" do
- File.stat(@name).dev_major.should be_kind_of(Integer)
- end
- end
-
- platform_is :windows do
- it "returns nil" do
- File.stat(@name).dev_major.should be_nil
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/dev_minor_spec.rb b/spec/rubyspec/core/file/stat/dev_minor_spec.rb
deleted file mode 100644
index 0475e3be81..0000000000
--- a/spec/rubyspec/core/file/stat/dev_minor_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#dev_minor" do
- before :each do
- @name = tmp("file.txt")
- touch(@name)
- end
- after :each do
- rm_r @name
- end
-
- platform_is_not :windows do
- it "returns the minor part of File::Stat#dev" do
- File.stat(@name).dev_minor.should be_kind_of(Integer)
- end
- end
-
- platform_is :windows do
- it "returns nil" do
- File.stat(@name).dev_minor.should be_nil
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/dev_spec.rb b/spec/rubyspec/core/file/stat/dev_spec.rb
deleted file mode 100644
index 3cdc704fd7..0000000000
--- a/spec/rubyspec/core/file/stat/dev_spec.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#dev" do
- before :each do
- @name = tmp("file.txt")
- touch(@name)
- end
- after :each do
- rm_r @name
- end
-
- it "returns the number of the device on which the file exists" do
- File.stat(@name).dev.should be_kind_of(Integer)
- end
-end
diff --git a/spec/rubyspec/core/file/stat/directory_spec.rb b/spec/rubyspec/core/file/stat/directory_spec.rb
deleted file mode 100644
index 5ead2dca49..0000000000
--- a/spec/rubyspec/core/file/stat/directory_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/directory', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#directory?" do
- it_behaves_like :file_directory, :directory?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/executable_real_spec.rb b/spec/rubyspec/core/file/stat/executable_real_spec.rb
deleted file mode 100644
index 11de0a5b39..0000000000
--- a/spec/rubyspec/core/file/stat/executable_real_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/executable_real', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#executable_real?" do
- it_behaves_like :file_executable_real, :executable_real?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/executable_spec.rb b/spec/rubyspec/core/file/stat/executable_spec.rb
deleted file mode 100644
index e3b1093056..0000000000
--- a/spec/rubyspec/core/file/stat/executable_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/executable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#executable?" do
- it_behaves_like :file_executable, :executable?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/file_spec.rb b/spec/rubyspec/core/file/stat/file_spec.rb
deleted file mode 100644
index da79dddb00..0000000000
--- a/spec/rubyspec/core/file/stat/file_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/file', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#file?" do
- it_behaves_like :file_file, :file?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/fixtures/classes.rb b/spec/rubyspec/core/file/stat/fixtures/classes.rb
deleted file mode 100644
index 4fe9a2a30f..0000000000
--- a/spec/rubyspec/core/file/stat/fixtures/classes.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class FileStat
- def self.method_missing(meth, file)
- File.lstat(file).send(meth)
- end
-end
diff --git a/spec/rubyspec/core/file/stat/ftype_spec.rb b/spec/rubyspec/core/file/stat/ftype_spec.rb
deleted file mode 100644
index 588c371c39..0000000000
--- a/spec/rubyspec/core/file/stat/ftype_spec.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-require "#{File.dirname(__FILE__)}/../../../spec_helper"
-require "#{File.dirname(__FILE__)}/../fixtures/file_types"
-
-describe "File::Stat#ftype" do
- before :all do
- FileSpecs.configure_types
- end
-
- it "returns a String" do
- FileSpecs.normal_file do |file|
- File.lstat(file).ftype.should be_kind_of(String)
- end
- end
-
- it "returns 'file' when the file is a file" do
- FileSpecs.normal_file do |file|
- File.lstat(file).ftype.should == 'file'
- end
- end
-
- it "returns 'directory' when the file is a dir" do
- FileSpecs.directory do |dir|
- File.lstat(dir).ftype.should == 'directory'
- end
- end
-
- platform_is_not :windows do
- it "returns 'characterSpecial' when the file is a char" do
- FileSpecs.character_device do |char|
- File.lstat(char).ftype.should == 'characterSpecial'
- end
- end
- end
-
- platform_is_not :freebsd do # FreeBSD does not have block devices
- with_block_device do
- it "returns 'blockSpecial' when the file is a block" do
- FileSpecs.block_device do |block|
- File.lstat(block).ftype.should == 'blockSpecial'
- end
- end
- end
- end
-
- platform_is_not :windows do
- it "returns 'link' when the file is a link" do
- FileSpecs.symlink do |link|
- File.lstat(link).ftype.should == 'link'
- end
- end
-
- it "returns fifo when the file is a fifo" do
- FileSpecs.fifo do |fifo|
- File.lstat(fifo).ftype.should == 'fifo'
- end
- end
-
- # This will silently not execute the block if no socket
- # can be found. However, if you are running X, there is
- # a good chance that if nothing else, at least the X
- # Server socket exists.
- it "returns 'socket' when the file is a socket" do
- FileSpecs.socket do |socket|
- File.lstat(socket).ftype.should == 'socket'
- end
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/gid_spec.rb b/spec/rubyspec/core/file/stat/gid_spec.rb
deleted file mode 100644
index 27356b6401..0000000000
--- a/spec/rubyspec/core/file/stat/gid_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#gid" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- File.chown(nil, Process.gid, @file)
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns the group owner attribute of a File::Stat object" do
- st = File.stat(@file)
- st.gid.is_a?(Integer).should == true
- st.gid.should == Process.gid
- end
-end
diff --git a/spec/rubyspec/core/file/stat/grpowned_spec.rb b/spec/rubyspec/core/file/stat/grpowned_spec.rb
deleted file mode 100644
index 07a52876d0..0000000000
--- a/spec/rubyspec/core/file/stat/grpowned_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/grpowned', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#grpowned?" do
- it_behaves_like :file_grpowned, :grpowned?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/ino_spec.rb b/spec/rubyspec/core/file/stat/ino_spec.rb
deleted file mode 100644
index 0339dee54f..0000000000
--- a/spec/rubyspec/core/file/stat/ino_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#ino" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- platform_is_not :windows do
- it "returns the ino of a File::Stat object" do
- st = File.stat(@file)
- st.ino.should be_kind_of(Integer)
- st.ino.should > 0
- end
- end
-
- platform_is :windows do
- ruby_version_is ""..."2.3" do
- it "returns 0" do
- st = File.stat(@file)
- st.ino.should be_kind_of(Integer)
- st.ino.should == 0
- end
- end
-
- ruby_version_is "2.3" do
- it "returns BY_HANDLE_FILE_INFORMATION.nFileIndexHigh/Low of a File::Stat object" do
- st = File.stat(@file)
- st.ino.should be_kind_of(Integer)
- st.ino.should > 0
- end
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/inspect_spec.rb b/spec/rubyspec/core/file/stat/inspect_spec.rb
deleted file mode 100644
index dd2ad21da3..0000000000
--- a/spec/rubyspec/core/file/stat/inspect_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#inspect" do
-
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- it "produces a nicely formatted description of a File::Stat object" do
- st = File.stat(@file)
- expected = "#<File::Stat dev=0x#{st.dev.to_s(16)}, ino=#{st.ino}, mode=#{sprintf("%07o", st.mode)}, nlink=#{st.nlink}"
- expected << ", uid=#{st.uid}, gid=#{st.gid}, rdev=0x#{st.rdev.to_s(16)}, size=#{st.size}, blksize=#{st.blksize.inspect}"
- expected << ", blocks=#{st.blocks.inspect}, atime=#{st.atime}, mtime=#{st.mtime}, ctime=#{st.ctime}"
- platform_is :bsd, :darwin do
- # Windows has File.birthtime but it's not here since already shown by ctime.
- expected << ", birthtime=#{st.birthtime}"
- end
- expected << ">"
- st.inspect.should == expected
- end
-end
diff --git a/spec/rubyspec/core/file/stat/mode_spec.rb b/spec/rubyspec/core/file/stat/mode_spec.rb
deleted file mode 100644
index 1c895bf0ce..0000000000
--- a/spec/rubyspec/core/file/stat/mode_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#mode" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- File.chmod(0644, @file)
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns the mode of a File::Stat object" do
- st = File.stat(@file)
- st.mode.is_a?(Integer).should == true
- (st.mode & 0777).should == 0644
- end
-end
diff --git a/spec/rubyspec/core/file/stat/mtime_spec.rb b/spec/rubyspec/core/file/stat/mtime_spec.rb
deleted file mode 100644
index 9dd20dfd65..0000000000
--- a/spec/rubyspec/core/file/stat/mtime_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#mtime" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns the mtime of a File::Stat object" do
- st = File.stat(@file)
- st.mtime.should be_kind_of(Time)
- st.mtime.should <= Time.now
- end
-end
diff --git a/spec/rubyspec/core/file/stat/new_spec.rb b/spec/rubyspec/core/file/stat/new_spec.rb
deleted file mode 100644
index ec7d81362f..0000000000
--- a/spec/rubyspec/core/file/stat/new_spec.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#initialize" do
-
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- File.chmod(0755, @file)
- end
-
- after :each do
- rm_r @file
- end
-
- it "raises an exception if the file doesn't exist" do
- lambda { File::Stat.new(tmp("i_am_a_dummy_file_that_doesnt_exist")) }.should raise_error
- end
-
- it "creates a File::Stat object for the given file" do
- st = File::Stat.new(@file)
- st.should be_kind_of(File::Stat)
- st.ftype.should == 'file'
- end
-
- it "calls #to_path on non-String arguments" do
- p = mock('path')
- p.should_receive(:to_path).and_return @file
- File::Stat.new p
- end
-end
diff --git a/spec/rubyspec/core/file/stat/nlink_spec.rb b/spec/rubyspec/core/file/stat/nlink_spec.rb
deleted file mode 100644
index e857b07fd1..0000000000
--- a/spec/rubyspec/core/file/stat/nlink_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#nlink" do
- before :each do
- @file = tmp("stat_nlink")
- @link = @file + ".lnk"
- touch @file
- end
-
- after :each do
- rm_r @link, @file
- end
-
- platform_is_not :windows do
- it "returns the number of links to a file" do
- File::Stat.new(@file).nlink.should == 1
- File.link(@file, @link)
- File::Stat.new(@file).nlink.should == 2
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/owned_spec.rb b/spec/rubyspec/core/file/stat/owned_spec.rb
deleted file mode 100644
index 4c4d843bbe..0000000000
--- a/spec/rubyspec/core/file/stat/owned_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/owned', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#owned?" do
- it_behaves_like :file_owned, :owned?, FileStat
-end
-
-describe "File::Stat#owned?" do
- before :each do
- @file = tmp("i_exist")
- touch(@file)
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns true if the file is owned by the user" do
- st = File.stat(@file)
- st.owned?.should == true
- end
-
- platform_is_not :windows do
- it "returns false if the file is not owned by the user" do
- system_file = '/etc/passwd'
- st = File.stat(system_file)
- st.owned?.should == false
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/pipe_spec.rb b/spec/rubyspec/core/file/stat/pipe_spec.rb
deleted file mode 100644
index e4c0b559bb..0000000000
--- a/spec/rubyspec/core/file/stat/pipe_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/pipe', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#pipe?" do
- it_behaves_like :file_pipe, :pipe?, FileStat
-end
-
-describe "File::Stat#pipe?" do
- it "returns false if the file is not a pipe" do
- filename = tmp("i_exist")
- touch(filename)
-
- st = File.stat(filename)
- st.pipe?.should == false
-
- rm_r filename
- end
-
- platform_is_not :windows do
- it "returns true if the file is a pipe" do
- filename = tmp("i_am_a_pipe")
- system "mkfifo #{filename}"
-
- st = File.stat(filename)
- st.pipe?.should == true
-
- rm_r filename
- end
- end
-
-end
diff --git a/spec/rubyspec/core/file/stat/rdev_major_spec.rb b/spec/rubyspec/core/file/stat/rdev_major_spec.rb
deleted file mode 100644
index f9d514fbc0..0000000000
--- a/spec/rubyspec/core/file/stat/rdev_major_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#rdev_major" do
- before :each do
- platform_is :solaris do
- @name = "/dev/zfs"
- end
- platform_is_not :solaris do
- @name = tmp("file.txt")
- touch(@name)
- end
- end
-
- after :each do
- platform_is_not :solaris do
- rm_r @name
- end
- end
-
- platform_is_not :windows do
- it "returns the major part of File::Stat#rdev" do
- File.stat(@name).rdev_major.should be_kind_of(Integer)
- end
- end
-
- platform_is :windows do
- it "returns nil" do
- File.stat(@name).rdev_major.should be_nil
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/rdev_minor_spec.rb b/spec/rubyspec/core/file/stat/rdev_minor_spec.rb
deleted file mode 100644
index 67399c5e68..0000000000
--- a/spec/rubyspec/core/file/stat/rdev_minor_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#rdev_minor" do
- before :each do
- platform_is :solaris do
- @name = "/dev/zfs"
- end
- platform_is_not :solaris do
- @name = tmp("file.txt")
- touch(@name)
- end
- end
-
- after :each do
- platform_is_not :solaris do
- rm_r @name
- end
- end
-
- platform_is_not :windows do
- it "returns the minor part of File::Stat#rdev" do
- File.stat(@name).rdev_minor.should be_kind_of(Integer)
- end
- end
-
- platform_is :windows do
- it "returns nil" do
- File.stat(@name).rdev_minor.should be_nil
- end
- end
-end
diff --git a/spec/rubyspec/core/file/stat/rdev_spec.rb b/spec/rubyspec/core/file/stat/rdev_spec.rb
deleted file mode 100644
index 12f97fb044..0000000000
--- a/spec/rubyspec/core/file/stat/rdev_spec.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#rdev" do
- before :each do
- @name = tmp("file.txt")
- touch(@name)
- end
- after :each do
- rm_r @name
- end
-
- it "returns the number of the device this file represents which the file exists" do
- File.stat(@name).rdev.should be_kind_of(Integer)
- end
-end
diff --git a/spec/rubyspec/core/file/stat/readable_real_spec.rb b/spec/rubyspec/core/file/stat/readable_real_spec.rb
deleted file mode 100644
index 49412f1df2..0000000000
--- a/spec/rubyspec/core/file/stat/readable_real_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/readable_real', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#readable_real?" do
- it_behaves_like :file_readable_real, :readable_real?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/readable_spec.rb b/spec/rubyspec/core/file/stat/readable_spec.rb
deleted file mode 100644
index 3d81975309..0000000000
--- a/spec/rubyspec/core/file/stat/readable_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/readable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#readable?" do
- it_behaves_like :file_readable, :readable?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/setgid_spec.rb b/spec/rubyspec/core/file/stat/setgid_spec.rb
deleted file mode 100644
index 318a72b437..0000000000
--- a/spec/rubyspec/core/file/stat/setgid_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/setgid', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#setgid?" do
- it_behaves_like :file_setgid, :setgid?, FileStat
-end
-
-describe "File::Stat#setgid?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/setuid_spec.rb b/spec/rubyspec/core/file/stat/setuid_spec.rb
deleted file mode 100644
index 5057af0ccc..0000000000
--- a/spec/rubyspec/core/file/stat/setuid_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/setuid', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#setuid?" do
- it_behaves_like :file_setuid, :setuid?, FileStat
-end
-
-describe "File::Stat#setuid?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/size_spec.rb b/spec/rubyspec/core/file/stat/size_spec.rb
deleted file mode 100644
index 84db12d591..0000000000
--- a/spec/rubyspec/core/file/stat/size_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/size', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat.size?" do
- it_behaves_like :file_size, :size?, FileStat
- it_behaves_like :file_size_nil_when_empty, :size?, FileStat
-end
-
-describe "File::Stat.size" do
- it_behaves_like :file_size, :size, FileStat
- it_behaves_like :file_size_0_when_empty, :size, FileStat
-end
-
-describe "File::Stat#size" do
- it "needs to be reviewed for spec completeness"
-end
-
-describe "File::Stat#size?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/socket_spec.rb b/spec/rubyspec/core/file/stat/socket_spec.rb
deleted file mode 100644
index b25d9314f9..0000000000
--- a/spec/rubyspec/core/file/stat/socket_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/socket', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#socket?" do
- it_behaves_like :file_socket, :socket?, FileStat
-end
-
-describe "File::Stat#socket?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/sticky_spec.rb b/spec/rubyspec/core/file/stat/sticky_spec.rb
deleted file mode 100644
index c2fefbe106..0000000000
--- a/spec/rubyspec/core/file/stat/sticky_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/sticky', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#sticky?" do
- it_behaves_like :file_sticky, :sticky?, FileStat
-end
-
-describe "File::Stat#sticky?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/symlink_spec.rb b/spec/rubyspec/core/file/stat/symlink_spec.rb
deleted file mode 100644
index 579c1de0ad..0000000000
--- a/spec/rubyspec/core/file/stat/symlink_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/symlink', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#symlink?" do
- it_behaves_like :file_symlink, :symlink?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/uid_spec.rb b/spec/rubyspec/core/file/stat/uid_spec.rb
deleted file mode 100644
index 75be97c234..0000000000
--- a/spec/rubyspec/core/file/stat/uid_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-
-describe "File::Stat#uid" do
- before :each do
- @file = tmp('i_exist')
- touch(@file) { |f| f.write "rubinius" }
- end
-
- after :each do
- rm_r @file
- end
-
- it "returns the owner attribute of a File::Stat object" do
- st = File.stat(@file)
- st.uid.is_a?(Integer).should == true
- st.uid.should == Process.uid
- end
-end
diff --git a/spec/rubyspec/core/file/stat/world_readable_spec.rb b/spec/rubyspec/core/file/stat/world_readable_spec.rb
deleted file mode 100644
index 178e39a1ea..0000000000
--- a/spec/rubyspec/core/file/stat/world_readable_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/world_readable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat.world_readable?" do
- it_behaves_like(:file_world_readable, :world_readable?, FileStat)
-end
-
-describe "File::Stat#world_readable?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/world_writable_spec.rb b/spec/rubyspec/core/file/stat/world_writable_spec.rb
deleted file mode 100644
index 73a7c6d3ed..0000000000
--- a/spec/rubyspec/core/file/stat/world_writable_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/world_writable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat.world_writable?" do
- it_behaves_like(:file_world_writable, :world_writable?, FileStat)
-end
-
-describe "File::Stat#world_writable?" do
- it "needs to be reviewed for spec completeness"
-end
diff --git a/spec/rubyspec/core/file/stat/writable_real_spec.rb b/spec/rubyspec/core/file/stat/writable_real_spec.rb
deleted file mode 100644
index e069db507b..0000000000
--- a/spec/rubyspec/core/file/stat/writable_real_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/writable_real', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#writable_real?" do
- it_behaves_like :file_writable_real, :writable_real?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/writable_spec.rb b/spec/rubyspec/core/file/stat/writable_spec.rb
deleted file mode 100644
index b720e59f81..0000000000
--- a/spec/rubyspec/core/file/stat/writable_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/writable', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#writable?" do
- it_behaves_like :file_writable, :writable?, FileStat
-end
diff --git a/spec/rubyspec/core/file/stat/zero_spec.rb b/spec/rubyspec/core/file/stat/zero_spec.rb
deleted file mode 100644
index 127c706b90..0000000000
--- a/spec/rubyspec/core/file/stat/zero_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../../../../shared/file/zero', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
-
-describe "File::Stat#zero?" do
- it_behaves_like :file_zero, :zero?, FileStat
-end