mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 17:52:17 +08:00
Adds font tests
This commit is contained in:
15
spec/font.rb
15
spec/font.rb
@@ -14,15 +14,20 @@ describe 'font' do
|
||||
@rmq.font.family_list.grep(/Helvetica/).length.should > 0
|
||||
end
|
||||
|
||||
it 'should return a list of fonts for one family ' do
|
||||
it 'should return a list of fonts for one family' do
|
||||
@rmq.font.for_family('Arial').grep(/Arial/).length.should > 0
|
||||
end
|
||||
|
||||
it 'should return a system fone given a size' do
|
||||
it 'should return a system font given a size' do
|
||||
@rmq.font.system(11).is_a?(UIFont).should == true
|
||||
end
|
||||
|
||||
#TODO test font_with_name
|
||||
|
||||
#TODO test named fonts
|
||||
it 'should return font with name' do
|
||||
@rmq.font.with_name('American Typewriter', 11).is_a?(UIFont).should == true
|
||||
end
|
||||
|
||||
it "should return fonts that have been named" do
|
||||
@rmq.font.add_named('awesome_font', 'American Typewriter', 12)
|
||||
@rmq.font.awesome_font.is_a?(UIFont).should.be.true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user