Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Apparently zero? behaves different on Solaris for File and File::Stat

  • Loading branch information...
commit e6b529bb9b4a39dc660fd3f2b6bc345c5f9a7647 1 parent ac7ca51
@dbussink dbussink authored brixen committed
View
6 core/file/stat/zero_spec.rb
@@ -4,4 +4,10 @@
describe "File::Stat#zero?" do
it_behaves_like :file_zero, :zero?, FileStat
+
+ platform_is :solaris do
+ it "returns false for /dev/null" do
+ FileStat.zero?('/dev/null').should == false
+ end
+ end
end
View
6 core/file/zero_spec.rb
@@ -4,4 +4,10 @@
describe "File.zero?" do
it_behaves_like :file_zero, :zero?, File
it_behaves_like :file_zero_missing, :zero?, File
+
+ platform_is :solaris do
+ it "returns false for /dev/null" do
+ File.zero?('/dev/null').should == true
+ end
+ end
end
View
6 core/filetest/zero_spec.rb
@@ -4,4 +4,10 @@
describe "FileTest.zero?" do
it_behaves_like :file_zero, :zero?, FileTest
it_behaves_like :file_zero_missing, :zero?, FileTest
+
+ platform_is :solaris do
+ it "returns false for /dev/null" do
+ File.zero?('/dev/null').should == true
+ end
+ end
end
View
6 shared/file/zero.rb
@@ -40,12 +40,6 @@
end
end
- platform_is :solaris do
- it "returns false for /dev/null" do
- @object.send(@method, '/dev/null').should == false
- end
- end
-
it "raises an ArgumentError if not passed one argument" do
lambda { File.zero? }.should raise_error(ArgumentError)
end
Please sign in to comment.
Something went wrong with that request. Please try again.