1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/library/pathname/birthtime_spec.rb
2022-01-28 14:42:38 +01:00

16 lines
438 B
Ruby

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