diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-08-27 23:54:25 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-08-28 01:34:46 -0600 |
| commit | 89e4a8ba395adebe7938c790162ef49843c51474 (patch) | |
| tree | f63e78793cd543419f19522fd202876b3ad7ecd7 /spec/sidebar_spec.rb | |
| parent | 91d6e289d3ac726b8473a4e25c741541971d5a8d (diff) | |
add test to verify border style on block can be set to dotted
Diffstat (limited to 'spec/sidebar_spec.rb')
| -rw-r--r-- | spec/sidebar_spec.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/spec/sidebar_spec.rb b/spec/sidebar_spec.rb index c8710066..c865161c 100644 --- a/spec/sidebar_spec.rb +++ b/spec/sidebar_spec.rb @@ -15,19 +15,34 @@ describe 'Asciidoctor::PDF::Converter - Sidebar' do (expect pdf.lines.map {|it| it[:width] }.uniq).to eql [0.5] end - it 'should apply border style defined by theme', visual: true do + it 'should apply dashed border style defined by theme', visual: true do pdf_theme = { sidebar_border_width: 1, sidebar_border_style: 'dashed', sidebar_border_color: 'cccccc', } - to_file = to_pdf_file <<~'EOS', 'sidebar-border-style.pdf', pdf_theme: pdf_theme + to_file = to_pdf_file <<~'EOS', 'sidebar-border-style-dashed.pdf', pdf_theme: pdf_theme **** sidebar **** EOS - (expect to_file).to visually_match 'sidebar-border-style.pdf' + (expect to_file).to visually_match 'sidebar-border-style-dashed.pdf' + end + + it 'should apply dotted border style defined by theme', visual: true do + pdf_theme = { + sidebar_border_width: 1.5, + sidebar_border_style: 'dotted', + sidebar_border_color: 'cccccc', + } + to_file = to_pdf_file <<~'EOS', 'sidebar-border-style-dotted.pdf', pdf_theme: pdf_theme + **** + sidebar + **** + EOS + + (expect to_file).to visually_match 'sidebar-border-style-dotted.pdf' end it 'should use block title as heading of sidebar block' do |
