Remove setting verbose mode to prevent logging of JRuby warnings
MODIFY
asciidoctorj-core/src/main/resources/org/asciidoctor/internal/asciidoctorclass.rb
asciidoctorj-core/src/main/resources/org/asciidoctor/internal/asciidoctorclass.rb
# Set the global variable VERBOSE to true to get invalid refs into the log
-$VERBOSE=true
+#$VERBOSE=true
module AsciidoctorJ
include_package 'org.asciidoctor'

ADD
asciidoctorj-core/src/test/java/org/asciidoctor/QandATest.java
+package org.asciidoctor;
+
+//import org.asciidoctor.ast.DescriptionList;
+import org.asciidoctor.ast.Document;
+//import org.asciidoctor.ast.StructuralNode;
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+
+public class QandATest {
+/*
+ private static final String DOC = "== Test\n" +
+ "\n" +
+ ".Q & A block\n"+
+ "[qanda]\n"+
+ "What is Asciidoctor?::\n"+
+ " An implementation of the AsciiDoc processor in Ruby.\n"+
+ "\n"+
+ "What is the answer to the Ultimate Question?:: 42";
+
+ @Test
+ public void shouldParseTitle() {
+ final Asciidoctor asciidoctor = Asciidoctor.Factory.create();
+ final Document doc = asciidoctor.load(DOC, OptionsBuilder.options().asMap());
+ final DescriptionList dl = findDescriptionList(doc);
+ assertThat(dl.getTitle(), is("Q &amp; A block"));
+ assertThat(dl.getStyle(), is("qanda"));
+ }
+
+ private DescriptionList findDescriptionList(StructuralNode node) {
+ if (node instanceof DescriptionList) {
+ return (DescriptionList) node;
+ } else {
+ for (StructuralNode structuralNode : node.getBlocks()) {
+ DescriptionList dl = findDescriptionList(structuralNode);
+ if (dl != null) {
+ return dl;
+ }
+ }
+ return null;
+ }
+ }
+ */
+}

MODIFY
asciidoctorj-core/src/test/java/org/asciidoctor/WhenAsciidoctorLogsToConsole.java
asciidoctorj-core/src/test/java/org/asciidoctor/WhenAsciidoctorLogsToConsole.java
@@ -8,6 +8,7 @@ import org.asciidoctor.log.TestLogHandlerService;
import org.asciidoctor.util.ClasspathResources;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -121,6 +122,7 @@ public class WhenAsciidoctorLogsToConsole {
}
@Test
+ @Ignore("Until invalid refs are logged by default")
public void shouldLogInvalidRefs() throws Exception {
final List<LogRecord> logRecords = new ArrayList<>();

Remove setting verbose mode to prevent logging of JRuby warnings