/vendor/gems/facets-2.4.5/test/core/time/test_change.rb
Ruby | 15 lines | 11 code | 4 blank | 0 comment | 0 complexity | 296f9e3f0cc62c279e10b8161c6ed546 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/time/change.rb'
- require 'test/unit'
- require 'time'
- class TC_Time_Change < Test::Unit::TestCase
- def test_change
- t = Time.parse('4/20/2006 15:37')
- n = Time.now
- n = n.change( :month=>4, :day=>20, :hour=>15, :min=>37, :year=>2006 )
- assert_equal( t, n )
- end
- end