diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-02-05 11:24:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-05 11:24:57 +0300 |
| commit | 49013bdb8527887af5f867168dce3d0aa4956bae (patch) | |
| tree | 134c88d346c6292721c4086fca9ffcc9f186d5b3 /spec/stem_spec.rb | |
| parent | 14d230c0e61292518d64a6d0eb6b171377845e1c (diff) | |
see #10 convert stem blocks to `<code>$stem_text</code>` (PR #293)
Diffstat (limited to 'spec/stem_spec.rb')
| -rw-r--r-- | spec/stem_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/stem_spec.rb b/spec/stem_spec.rb new file mode 100644 index 0000000..2f2cac7 --- /dev/null +++ b/spec/stem_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require_relative 'spec_helper' + +describe 'Asciidoctor::Epub3::Converter - Stem' do + it 'converts stem block to <code>' do + book, = to_epub 'stem/book.adoc' + chapter = book.item_by_href '_chapter.xhtml' + expect(chapter).not_to be_nil + expect(chapter.content).to include '<code>\sqrt(4) = 2</code>' + end + + it 'converts inline stem to <code>' do + book, = to_epub 'inline-stem/book.adoc' + chapter = book.item_by_href '_chapter.xhtml' + expect(chapter).not_to be_nil + expect(chapter.content).to include '<code class="literal">y=x^2 sqrt(4)</code>' + end +end |
