Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add test for 24 hour to 12 hour

  • Loading branch information...
commit c4e44a922bf9da51e3d54fd0cd9bc101a5def918 1 parent 3d6c9a1
Keenan Brock authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/translator_test.rb
14 test/translator_test.rb
View
@@ -0,0 +1,14 @@
+require 'minitest/autorun'
+require 'stamp'
+
+class TranslatorTest < MiniTest::Unit::TestCase
+ def test_hour_to_12_hour
+ t = ::Stamp::StrftimeTranslator::HOUR_TO_12_HOUR
+
+ assert_equal 12, t.call(0)
+ assert_equal 5, t.call(5)
+ assert_equal 12, t.call(12)
+ assert_equal 5, t.call(17)
+ assert_equal 12, t.call(24)
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.