aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/library/date/jd_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/library/date/jd_spec.rb')
-rw-r--r--spec/rubyspec/library/date/jd_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/rubyspec/library/date/jd_spec.rb b/spec/rubyspec/library/date/jd_spec.rb
new file mode 100644
index 0000000000..ccf6b93e06
--- /dev/null
+++ b/spec/rubyspec/library/date/jd_spec.rb
@@ -0,0 +1,15 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/jd', __FILE__)
+require 'date'
+
+describe "Date#jd" do
+
+ it "determines the Julian day for a Date object" do
+ Date.civil(2008, 1, 16).jd.should == 2454482
+ end
+
+end
+
+describe "Date.jd" do
+ it_behaves_like :date_jd, :jd
+end