summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/yday_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/yday_spec.rb')
-rw-r--r--spec/ruby/core/time/yday_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/core/time/yday_spec.rb b/spec/ruby/core/time/yday_spec.rb
new file mode 100644
index 0000000000..e920c2e28d
--- /dev/null
+++ b/spec/ruby/core/time/yday_spec.rb
@@ -0,0 +1,12 @@
+require_relative '../../spec_helper'
+require_relative '../../shared/time/yday'
+
+describe "Time#yday" do
+ it "returns an integer representing the day of the year, 1..366" do
+ with_timezone("UTC") do
+ Time.at(9999999).yday.should == 116
+ end
+ end
+
+ it_behaves_like :time_yday, -> year, month, day { Time.new(year, month, day).yday }
+end