PageRenderTime 25ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/integer/test_even.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 16 lines | 12 code | 4 blank | 0 comment | 2 complexity | f8c53143e7530656b860e26ac0d3517b MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/integer/even'
  2. require 'test/unit'
  3. class TC_Integer < Test::Unit::TestCase
  4. def test_even?
  5. (-100..100).step(2) do |n|
  6. assert(n.even? == true)
  7. end
  8. (-101..101).step(2) do |n|
  9. assert(n.even? == false)
  10. end
  11. end
  12. end