Skip to content

Instantly share code, notes, and snippets.

@eerohele
Created May 30, 2016 19:00
Show Gist options
  • Save eerohele/65a67df28983a6eed8a26c453dd30a17 to your computer and use it in GitHub Desktop.
Save eerohele/65a67df28983a6eed8a26c453dd30a17 to your computer and use it in GitHub Desktop.
Testing XSLT with Scala and specs2
object Fixtures {
val Stylesheet = new File("/opt/dita-ot/xsl/preprocess/conrefImpl.xsl")
}
class MySpecification extends XsltSpecification(Fixtures.Stylesheet) {
"@conref to existing element is resolved" >> {
becomes(
<p domains="(topic hi-d)" conref="a.dita#b/c"/>,
<p domains="(topic hi-d)">d</p>,
MockFile("a.dita",
<topic class="- topic/topic " id="b" domains="(topic hi-d)">
<title/>
<body>
<p id="c">d</p>
</body>
</topic>
)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment