Sha256: 79a870be22e0d3e33b40153662d3e0bd989539c525d4bed5abcdcc1dd4132b05

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

describe "Symbol" do

  describe "uifont" do
    it "should work with system fonts" do
      UIFont.should === :system.uifont
      UIFont.should === :bold.uifont
      UIFont.should === :italic.uifont
    end

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

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

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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sugarcube-0.18.2 spec/symbol_spec.rb