test/test_font.rb in rays-0.1.21 vs test/test_font.rb in rays-0.1.22
- old
+ new
@@ -4,29 +4,29 @@
require_relative 'helper'
class TestFont < Test::Unit::TestCase
- def font (*args)
- Rays::Font.new *args
+ def font(*args)
+ Rays::Font.new(*args)
end
- def test_name ()
+ def test_name()
assert_kind_of String, font.name
end
- def test_size ()
+ def test_size()
assert_kind_of Numeric, font.size
assert_equal 32, font(nil, 32).size
end
- def test_width ()
+ def test_width()
assert_equal 0, font.width('')
w = font.width 'X'
assert_equal w * 2, font.width('XX')
end
- def test_height ()
+ def test_height()
f = font
assert_equal f.height, f.ascent + f.descent + f.leading
end
end# TestFont