Add pretty printing for Json and ArrayList #715

Closed
APshenkin opened this Issue Apr 5, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@APshenkin

Unroll feature is great for documentation and explanation for tests. But it looks good only if we have short variables. When You have ArrayList or Json in variable it looks ugly in description (no pretty print). It would be great to add pretty printing for large constructions like Json or ArrayList.

Here is a simple example how to do that. It doesn't look nice, sorry for my bad code (newbie in Java), I think you can provide better solution 😃
https://github.com/APshenkin/spock/blob/patch-1/spock-core/src/main/java/org/spockframework/runtime/extension/builtin/UnrollNameProvider.java#L87

@leonard84

This comment has been minimized.

Show comment
Hide comment
@leonard84

leonard84 Jul 7, 2018

Member

Sorry I don't think that is a good fit for Spock, having huge method names are an anti-pattern. They should be descriptive and succinct. Furthermore, having new lines in them could produce issues with reporting tools.

Member

leonard84 commented Jul 7, 2018

Sorry I don't think that is a good fit for Spock, having huge method names are an anti-pattern. They should be descriptive and succinct. Furthermore, having new lines in them could produce issues with reporting tools.

@leonard84 leonard84 closed this Jul 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment