зеркало из https://github.com/github/ruby.git
[Bug #18946] Use Gregorian dates to test
This commit is contained in:
Родитель
a24c607e30
Коммит
e0dfa5967e
|
@ -7,10 +7,10 @@ describe "DateTime#to_time" do
|
|||
end
|
||||
|
||||
it "returns a Time representing the same instant" do
|
||||
datetime = DateTime.civil(3, 12, 31, 23, 58, 59)
|
||||
datetime = DateTime.civil(2012, 12, 31, 23, 58, 59)
|
||||
time = datetime.to_time.utc
|
||||
|
||||
time.year.should == 3
|
||||
time.year.should == 2012
|
||||
time.month.should == 12
|
||||
time.day.should == 31
|
||||
time.hour.should == 23
|
||||
|
|
|
@ -3,9 +3,9 @@ require 'time'
|
|||
|
||||
describe "Time#to_datetime" do
|
||||
it "returns a DateTime representing the same instant" do
|
||||
time = Time.utc(3, 12, 31, 23, 58, 59)
|
||||
time = Time.utc(2012, 12, 31, 23, 58, 59)
|
||||
datetime = time.to_datetime
|
||||
datetime.year.should == 3
|
||||
datetime.year.should == 2012
|
||||
datetime.month.should == 12
|
||||
datetime.day.should == 31
|
||||
datetime.hour.should == 23
|
||||
|
|
Загрузка…
Ссылка в новой задаче