summaryrefslogtreecommitdiff
path: root/spec/ruby/library/pathname/birthtime_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/pathname/birthtime_spec.rb')
-rw-r--r--spec/ruby/library/pathname/birthtime_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/ruby/library/pathname/birthtime_spec.rb b/spec/ruby/library/pathname/birthtime_spec.rb
new file mode 100644
index 0000000000..109c112303
--- /dev/null
+++ b/spec/ruby/library/pathname/birthtime_spec.rb
@@ -0,0 +1,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