spec/lib/svg_spec.rb in prawn-svg-0.12.0.10 vs spec/lib/svg_spec.rb in prawn-svg-0.12.0.11
- old
+ new
@@ -10,11 +10,11 @@
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
+ Prawn::Document.generate("#{root}/spec/sample_output/#{File.basename file}.pdf") do |prawn|
+ r = prawn.svg IO.read(file), :at => [0, prawn.bounds.top], :width => prawn.bounds.width, :cache_images => true
warnings = r[:warnings].reject {|w| w =~ /Verdana/ && w =~ /is not a known font/ }
end
warnings.should == []
end
end