diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-07-16 23:49:44 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-07-17 01:49:54 -0600 |
| commit | d257440df895d1595a3825ef58b32e4b290ba1c3 (patch) | |
| tree | e8ae4ab57a562115fb9c5629b5c58e86f638381c /spec/admonition_spec.rb | |
| parent | 8c96bb13699ff7fc73ef3220b07640ff43271907 (diff) | |
test that admonition uses base border width for column rule if column rule width is nil
Diffstat (limited to 'spec/admonition_spec.rb')
| -rw-r--r-- | spec/admonition_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/admonition_spec.rb b/spec/admonition_spec.rb index 3cefb4a6..7bd1cf29 100644 --- a/spec/admonition_spec.rb +++ b/spec/admonition_spec.rb @@ -677,6 +677,24 @@ describe 'Asciidoctor::PDF::Converter - Admonition' do (expect column_rule[:style]).to eql :dotted end + it 'should use base border width for column rule if column rule width is nil' do + pdf_theme = { + base_border_width: 2, + admonition_column_rule_color: '222222', + admonition_column_rule_width: nil, + } + pdf = to_pdf <<~'EOS', pdf_theme: pdf_theme, analyze: :line + TIP: You can use the theme to customize the color and width of the column rule. + EOS + + lines = pdf.lines + (expect lines).to have_size 1 + column_rule = lines[0] + (expect column_rule[:from][:x]).to eql column_rule[:to][:x] + (expect column_rule[:color]).to eql '222222' + (expect column_rule[:width]).to eql 2 + end + it 'should allow theme to add border', visual: true do pdf_theme = { admonition_border_width: 0.5, |
