I think you just need to err on the side of more lines.  I found that
failsToCompile() on its own line does more to make the test readable than
anything.

On Mon Sep 16 2013 at 6:32:20 PM, Christian Edward Gruber <
notifications@github.com> wrote:

> In
> compiler/src/test/java/dagger/tests/integration/validation/CyclicModuleIncludesTest.java:
>
> > +          "  @Module(includes = Scissors.class)",
> > +          "  static class Lizard {}",
> > +          "  @Module(includes = Lizard.class)",
> > +          "  static class Spock {}",
> > +          "}"));
> > +
> > +  @Test public void cyclicModuleSelfIncludes() {
> > +    ASSERT.about(javaSource()).that(javaFile).processedWith(daggerProcessors()).failsToCompile()
> > +        .withErrorContaining("CyclicModules.SelfReferencingModule includes itself directly")
> > +            .in(javaFile).onLine(4);
> > +  }
> > +
> > +  @Test public void cyclicModuleIncludes_full_cycle() {
> > +    ASSERT.about(javaSource()).that(javaFile).processedWith(daggerProcessors()).failsToCompile()
> > +        .withErrorContaining("0. CyclicModules.Rock included by CyclicModules.Paper")
> > +            .in(javaFile).onLine(6).and()
>
> Yeah, I really struggled with that, but I also ended up having real issues
> making everything line up so it was readable. That is, the first of a
> sequence of "with" clauses will be wierdly off-set.
>
> I think if we'd gone with
> .failsToCompile().and().hasErrorContaining().and()... it would have
> worked out better with and() at the front. :/
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/google/dagger/pull/11/files#r6392901>
> .
>