diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-02-15 23:50:07 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2021-02-16 03:30:13 -0700 |
| commit | 1f56d5a4bfd4b4929d409ecb9f6f8eb0bf6fae84 (patch) | |
| tree | 80ed7bebc994d262670f91c15e2f67c6e4c1b6fa /spec/admonition_spec.rb | |
| parent | b2755db2de22831698b328b3b6d1a06381bfb68d (diff) | |
verify default width is used for vertical rule if not specified
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 45d29d39..2ea6632e 100644 --- a/spec/admonition_spec.rb +++ b/spec/admonition_spec.rb @@ -870,6 +870,24 @@ describe 'Asciidoctor::PDF::Converter - Admonition' do end end + it 'should assign default width to column rule if key is not specified' do + pdf_theme = { + 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 0.5 + (expect column_rule[:style]).to eql :solid + end + it 'should allow theme to specify double style for column rule' do pdf_theme = { admonition_column_rule_color: '222222', |
