aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/file/stat/dev_minor_spec.rb
blob: 0475e3be816b56e2f4abe7f6faaededdea6d933c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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