summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/yday_spec.rb
blob: e920c2e28decc10ecb3b4a04dc32790524ddf617 (plain)
1
2
3
4
5
6
7
8
9
10
11
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