/vendor/gems/facets-2.4.5/test/core/string/test_align.rb
https://bitbucket.org/mediashelf/fedora-migrator · Ruby · 22 lines · 13 code · 8 blank · 1 comment · 0 complexity · ba51eb2f5599cd02bad5f8838286d522 MD5 · raw file
- # Test for lib/facets/string/align.rb
- require 'facets/string/align.rb'
- require 'test/unit'
- class TestStringAlign < Test::Unit::TestCase
- def test_align_right
- assert_equal( " xxx", "xxx".align_right(9) )
- end
- def test_align_left
- assert_equal( "xxx ", "xxx".align_left(9) )
- end
- def test_align_center
- assert_equal( " xxx ", "xxx".align_center(9) )
- end
- end