summaryrefslogtreecommitdiff
path: root/spec/ruby/library/pathname/birthtime_spec.rb
blob: 109c1123032c5cbdc0197668b08f41d81d11b499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require_relative '../../spec_helper'
require 'pathname'

describe "Pathname#birthtime" do
  platform_is :windows, :darwin, :freebsd, :netbsd do
    it "returns the birth time for self" do
      Pathname.new(__FILE__).birthtime.should be_kind_of(Time)
    end
  end

  platform_is :openbsd do
    it "raises an NotImplementedError" do
      -> { Pathname.new(__FILE__).birthtime }.should raise_error(NotImplementedError)
    end
  end
end