Skip to content

Instantly share code, notes, and snippets.

@Vad1mo
Last active December 29, 2015 23:59
Show Gist options
  • Save Vad1mo/7746661 to your computer and use it in GitHub Desktop.
Save Vad1mo/7746661 to your computer and use it in GitHub Desktop.
test fails when asciidoc-bootstrap-backend is set.
import static org.asciidoctor.OptionsBuilder.options;
import static org.junit.Assert.*;
import org.asciidoctor.Asciidoctor;
import org.asciidoctor.Options;
import org.asciidoctor.Asciidoctor.Factory;
import org.asciidoctor.OptionsBuilder;
import org.jruby.exceptions.RaiseException;
import org.junit.Test;
public class AsciidocBackendTest {
private String contents = "= AsciiDoc Writer's Guide\n" +
"Doc Writer <doc.writer@asciidoc.org>\n" +
"v1.0, 2013-01-01\n" +
":toc:\n\n" +
"== A\n" +
"toc::[]\n";
@Test //(expected=RaiseException.class)
public void fialOnBackend() {
Asciidoctor asciidoctor = Factory.create();
OptionsBuilder options = options().backend("/Users/v/Downloads/bootstrap-3.0.1");
String out = asciidoctor.render(contents , options);
assertNotNull(out);
assertFalse(out.isEmpty());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment