Sha256: daa03e8023c7a4e495b6cddbea7bb2b5ea99cd593317ba7216fb828711fdd71c

Contents?: true

Size: 766 Bytes

Versions: 6

Compression:

Stored size: 766 Bytes

Contents

require 'spec_helper'

describe Prawn::Svg::Interface do
  describe "sample file rendering" do
    root = "#{File.dirname(__FILE__)}/../.."
    files = Dir["#{root}/spec/sample_svg/*.svg"]

    it "has at least 10 SVG sample files to test" do
      files.length.should >= 10
    end

    files.each do |file|
      it "renders the #{File.basename file} sample file without warnings or crashing" do
        warnings = nil
        Prawn::Document.generate("#{root}/spec/sample_output/#{File.basename file}.pdf") do
          r = svg IO.read(file), :at => [0, y], :width => 612 - 72, :cache_images => true
          warnings = r[:warnings].reject {|w| w =~ /Verdana/ && w =~ /is not a known font/ }
        end
        warnings.should == []
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
prawn-svg-0.12.0.10 spec/lib/svg_spec.rb
prawn-svg-0.12.0.9 spec/lib/svg_spec.rb
prawn-svg-0.12.0.8 spec/lib/svg_spec.rb
prawn-svg-0.12.0.7 spec/lib/svg_spec.rb
prawn-svg-0.12.0.6 spec/lib/svg_spec.rb
prawn-svg-0.12.0.4 spec/lib/svg_spec.rb