forked from jeremyw/stamp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Keenan Brock
committed
Dec 11, 2012
1 parent
3d6c9a1
commit c4e44a9
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |