PageRenderTime 39ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/time/test_hence.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 13 lines | 10 code | 3 blank | 0 comment | 0 complexity | b20295d3f7282670d1a06490b68242ec MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/time/hence'
  2. require 'test/unit'
  3. require 'time'
  4. class TC_Time_Hence < Test::Unit::TestCase
  5. def test_hence
  6. t1 = Time.parse('8/20/2005 15:37')
  7. t2 = t1.hence(5, :months)
  8. assert_equal( 1, t2.month )
  9. end
  10. end