diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-06-02 14:34:07 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-06-02 14:34:07 +0200 |
commit | 22e2a6a999b958efe5d84d9c7314e450fda82254 (patch) | |
tree | b2dc946cf2fe2c250d0583675e548c67dca3e71a /spec/ruby/shared/time/strftime_for_time.rb | |
parent | a4fbc7e2884ba694278adea3b32ddb8c2ac10efe (diff) |
Update to ruby/spec@a0b7d0d
Diffstat (limited to 'spec/ruby/shared/time/strftime_for_time.rb')
-rw-r--r-- | spec/ruby/shared/time/strftime_for_time.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/shared/time/strftime_for_time.rb b/spec/ruby/shared/time/strftime_for_time.rb index 49cd09051a..9f4d08d72e 100644 --- a/spec/ruby/shared/time/strftime_for_time.rb +++ b/spec/ruby/shared/time/strftime_for_time.rb @@ -170,4 +170,12 @@ describe :strftime_time, shared: true do time.strftime("%-k%p").should == "8AM" time.strftime("%-l%p").should == "8AM" end + + it "should be able to show default Logger format" do + default_logger_format = "%Y-%m-%dT%H:%M:%S.%6N " + @new_time[2001, 2, 3, 4, 5, 6].strftime(default_logger_format).should == "2001-02-03T04:05:06.000000 " + @new_time[2001, 12, 3, 4, 5, 6 + 1/10r].strftime(default_logger_format).should == "2001-12-03T04:05:06.100000 " + @new_time[2001, 2, 13, 4, 5, 6 + 1/100r].strftime(default_logger_format).should == "2001-02-13T04:05:06.010000 " + @new_time[2001, 2, 3, 14, 5, 6 + 1/1000r].strftime(default_logger_format).should == "2001-02-03T14:05:06.001000 " + end end |