X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=spec%2Fspec_helper.rb;h=1727b0f69bce9100fd4ac726fb99fc0a62b1c043;hp=cf9c9713576b471446e339b8ea3c13f3b193cb3a;hb=727449f065760e1d99735f44638c25678cd8bc52;hpb=ecd7c7248b9a93163090bfe7512b2a53d8da6d95 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cf9c971..1727b0f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -53,7 +53,8 @@ class Area @rgb.minmax != [@rgb[0],@rgb[0]] or raise AreaError.new(self,"is plain colored") end def should_contain_text(text) - @file.get_text(@x1,@y1,@x2,@y2) == text or raise AreaError.new(self, "doesn't contain text #{text}") + text2 = @file.get_text(@x1,@y1,@x2,@y2) + text2 == text or raise AreaError.new(self, "doesn't contain text \"#{text}\" (found: \"#{text2}\")") end def to_s "(#{@x1},#{@y1},#{@x2},#{@y2})" @@ -111,7 +112,7 @@ class DocFile `pdfinfo #{@filename}` =~ /Page size:\s*([0-9]+) x ([0-9]+) pts/ width,height = $1,$2 dpi = (72.0 * 612 / width.to_i).to_i - output = `pdf2swf --flatten -s zoom=#{dpi} -p #{@page} #{@filename} -o #{@swfname} 2>&1` + output = `pdf2swf -f --flatten -s zoom=#{dpi} -p #{@page} #{@filename} -o #{@swfname} 2>&1` #output = `pdf2swf -s zoom=#{dpi} --flatten -p #{@page} #{@filename} -o #{@swfname} 2>&1` raise ConversionFailed.new(output,@swfname) unless File.exists?(@swfname) end