Sha256: 662a97c3ba966af99c21a599be0da4656922f5ab84d3a853cc6bb736d2776975

Contents?: true

Size: 761 Bytes

Versions: 54

Compression:

Stored size: 761 Bytes

Contents

describe "Symbol - uifont" do

  it "should work with system fonts" do
    :system.uifont.should.be.kind_of(UIFont)
    :bold.uifont.should.be.kind_of(UIFont)
    :italic.uifont.should.be.kind_of(UIFont)
  end

  it "should work with custom fonts" do
    :monospace.uifont.should != nil
    :monospace.uifont.should.be.kind_of(UIFont)
  end

  it "should allow customization" do
    Symbol.uifont[:default] = 'Helvetica'
    :default.uifont.tap do |subject|
      subject.should.be.kind_of(UIFont)
      subject.fontName.should == 'Helvetica'
    end
  end

  it "should accept point size" do
    :system.uifont(40).pointSize.should == 40
  end

  it "should accept symbol size" do
    :system.uifont(:label).pointSize.should == UIFont.labelFontSize
  end

end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
sugarcube-2.4.2 spec/ios/symbol_uifont_spec.rb
sugarcube-2.4.1 spec/ios/symbol_uifont_spec.rb
sugarcube-2.4.0 spec/ios/symbol_uifont_spec.rb
sugarcube-2.3.0 spec/ios/symbol_uifont_spec.rb
sugarcube-2.2.0 spec/ios/symbol_uifont_spec.rb
sugarcube-2.1.5 spec/ios/symbol_uifont_spec.rb
sugarcube-2.1.4 spec/ios/symbol_uifont_spec.rb
sugarcube-2.1.3 spec/ios/symbol_uifont_spec.rb
sugarcube-2.1.2 spec/ios/symbol_uifont_spec.rb
sugarcube-2.1.1 spec/ios/symbol_uifont_spec.rb
sugarcube-2.1.0 spec/ios/symbol_uifont_spec.rb
sugarcube-2.0.2 spec/ios/symbol_uifont_spec.rb
sugarcube-2.0.1 spec/ios/symbol_uifont_spec.rb
sugarcube-2.0.0 spec/ios/symbol_uifont_spec.rb