Sha256: 224f5cd135ff4de6f2d44ae425874a69f5b0179c35740e62aa675c9ec36ac181
Contents?: true
Size: 677 Bytes
Versions: 1
Compression:
Stored size: 677 Bytes
Contents
require 'cheapredwine' require 'tempfile' describe CheapRedWine do let(:file) { File.new('spec/fixtures/hobo.otf') } let(:meta) { CheapRedWine.meta(file) } it "gets meta information from a font file" do meta.name.should eq "Hobo Std Medium" meta.file.path.should match file.path end it "can create images from text" do options = { size: 26, features: ['liga', 'frac'] } image = CheapRedWine.image(meta, 'ffi 1/2', options) tempfile = Tempfile.new('image') tempfile.write(image.read) tempfile.close mimetype = IO.popen(["file", "--brief", "--mime-type", tempfile.path]). read.chomp mimetype.should eq "image/png" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cheapredwine-0.2.0 | spec/cheapredwine_spec.rb |