diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-06-15 00:54:30 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-06-15 00:54:30 -0600 |
| commit | 06e81747ae66b93c6d6668355835e5ca2e74a418 (patch) | |
| tree | 5bb742bf101137410d401daf703544eb4c395df7 /spec/page_spec.rb | |
| parent | 5b689a3baad59dfe702ddb6a302da6d797c4a7bc (diff) | |
fix test on older versions of Ruby
Diffstat (limited to 'spec/page_spec.rb')
| -rw-r--r-- | spec/page_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/page_spec.rb b/spec/page_spec.rb index febe2f5a..485dc603 100644 --- a/spec/page_spec.rb +++ b/spec/page_spec.rb @@ -876,7 +876,8 @@ describe 'Asciidoctor::PDF::Converter - Page' do content EOS - center_coords = pdf.images[0].then {|it| [it[:x], it[:y]] } + bg_image = pdf.images[0] + center_coords = [bg_image[:x], bg_image[:y]] pdf = to_pdf <<~'EOS', analyze: :image = Document Title @@ -885,7 +886,8 @@ describe 'Asciidoctor::PDF::Converter - Page' do content EOS - actual_coords = pdf.images[0].then {|it| [it[:x], it[:y]] } + bg_image = pdf.images[0] + actual_coords = [bg_image[:x], bg_image[:y]] (expect actual_coords).to eql center_coords end |
