blob: dc30c1f56cda525a0c835eb4b5217a8086009d8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
require_relative '../../../spec_helper'
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
|