Skip to content

Commit

Permalink
add test for 24 hour to 12 hour
Browse files Browse the repository at this point in the history
  • Loading branch information
Keenan Brock committed Dec 11, 2012
1 parent 3d6c9a1 commit c4e44a9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/translator_test.rb
@@ -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.