test/text_test.rb in asciidoctor-1.5.6.2 vs test/text_test.rb in asciidoctor-1.5.7
- old
+ new
@@ -4,29 +4,29 @@
require 'test_helper'
end
context "Text" do
test "proper encoding to handle utf8 characters in document using html backend" do
- output = example_document(:encoding).render
+ output = example_document(:encoding).convert
assert_xpath '//p', output, 4
assert_xpath '//a', output, 1
end
test "proper encoding to handle utf8 characters in embedded document using html backend" do
- output = example_document(:encoding, :header_footer => false).render
+ output = example_document(:encoding, :header_footer => false).convert
assert_xpath '//p', output, 4
assert_xpath '//a', output, 1
end
test "proper encoding to handle utf8 characters in document using docbook45 backend" do
- output = example_document(:encoding, :attributes => {'backend' => 'docbook45', 'xmlns' => ''}).render
+ output = example_document(:encoding, :attributes => {'backend' => 'docbook45', 'xmlns' => ''}).convert
assert_xpath '//xmlns:simpara', output, 4
assert_xpath '//xmlns:ulink', output, 1
end
test "proper encoding to handle utf8 characters in embedded document using docbook45 backend" do
- output = example_document(:encoding, :header_footer => false, :attributes => {'backend' => 'docbook45'}).render
+ output = example_document(:encoding, :header_footer => false, :attributes => {'backend' => 'docbook45'}).convert
assert_xpath '//simpara', output, 4
assert_xpath '//ulink', output, 1
end
# NOTE this test ensures we have the encoding line on block templates too
@@ -35,20 +35,20 @@
input << "[verse]\n"
input.concat(File.readlines(sample_doc_path(:encoding)))
doc = empty_document
reader = Asciidoctor::PreprocessorReader.new doc, input, nil, :normalize => true
block = Asciidoctor::Parser.next_block(reader, doc)
- assert_xpath '//pre', block.render.gsub(/^\s*\n/, ''), 1
+ assert_xpath '//pre', block.convert.gsub(/^\s*\n/, ''), 1
end
test 'proper encoding to handle utf8 characters from included file' do
input = <<-EOS
include::fixtures/encoding.asciidoc[tags=romé]
EOS
- doc = empty_safe_document :base_dir => File.expand_path(File.dirname(__FILE__))
+ doc = empty_safe_document :base_dir => testdir
reader = Asciidoctor::PreprocessorReader.new doc, input, nil, :normalize => true
block = Asciidoctor::Parser.next_block(reader, doc)
- output = block.render
+ output = block.convert
assert_css '.paragraph', output, 1
end
test 'escaped text markup' do
assert_match(/All your <em>inline<\/em> markup belongs to <strong>us<\/strong>!/,