diff --git a/spec/diagram_spec.rb b/spec/diagram_spec.rb index 32733fefb..4e1f508e4 100644 --- a/spec/diagram_spec.rb +++ b/spec/diagram_spec.rb @@ -41,7 +41,8 @@ (expect Pathname.new output_file 'images/pdfwidth-test.png').to exist images = pdf.images (expect images).to have_size 1 - (expect images[0][:intrinsic_width].to_f).to eql 288.0 + image_data = JSON.load_file Pathname.new output_file '.asciidoctor/diagram/pdfwidth-test.png.cache' + (expect images[0][:intrinsic_width].to_f).to eql image_data['width'].to_f (expect images[0][:width].to_f).to eql 72.0 end