Sha256: 0705afe256a0cd763e34031489388063d3d9fec3a14d13f8b3e04d4f129e2939
Contents?: true
Size: 577 Bytes
Versions: 4
Compression:
Stored size: 577 Bytes
Contents
covers 'facets/time/trunc' testcase Time do t = Time.local(2000,03,03,3,37,23) unit :trunc => "hour" do t.trunc(60 * 60).assert == Time.local(2000,03,03,3, 0) end #unit :trunc => "month" do # t.trunc(1.month).assert == Time.local(2000,03,01,0, 0) #end unit :trunc => "15 minutes" do t.trunc(15 * 60).assert == Time.local(2000,03,03,3,30) end unit :trunc => "10 minutes" do t.trunc(10 * 60).assert == Time.local(2000,03,03,3,30) end unit :trunc => "05 minutes" do t.trunc(5 * 60).assert == Time.local(2000,03,03,3,35) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
facets-2.9.1 | test/core/time/test_trunc.rb |
facets-2.9.0 | test/core/time/test_trunc.rb |
facets-2.9.0.pre.2 | test/core/time/test_trunc.rb |
facets-2.9.0.pre.1 | test/core/time/test_trunc.rb |