Permalink
Browse files

add test for 24 hour to 12 hour

  • Loading branch information...
kbrock committed Dec 11, 2012
1 parent 3d6c9a1 commit c4e44a922bf9da51e3d54fd0cd9bc101a5def918
Showing with 14 additions and 0 deletions.
  1. +14 −0 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

0 comments on commit c4e44a9

Please sign in to comment.