/vendor/gems/facets-2.4.5/test/core/time/test_stamp.rb
Ruby | 28 lines | 15 code | 8 blank | 5 comment | 0 complexity | dc6c9e1892837acb8c801486566b470d MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/time.rb'
- require 'test/unit'
- require 'time'
- class TC_Time_Stamp < Test::Unit::TestCase
- def setup
- end
- # TODO Problem with TIMEZONE.
- #def test_stamp_01
- # t = Time.parse('4/20/2005 15:37')
- # assert_equal( "Wed Apr 20 15:37:00 PDT 2005", t.stamp )
- #end
- def test_stamp_02
- t = Time.parse('4/20/2005 15:37')
- assert_equal( "April 20, 2005 15:37", t.stamp(:long) )
- end
- def test_stamp_03
- t = Time.parse('4/20/2005 15:37')
- assert_equal( "20 Apr 15:37", t.stamp(:short) )
- end
- end