Fork me on GitHub

Morning. Apologies for being absent for a while. However, I’m back and I’ve got a challenge for you… I ran a session that was well received last night at the West Midlands Java User Group in the use of RDD for exploring Java libraries using Clojure. Attendees saw a lot of value in the REPL, and extracting examples out of REPL play into tests. However… The parens and syntax was a challenge for a few, and one attendee asked for examples of easy to read acceptance tests or integration tests written in Clojure. One’s that would be easy for testers to understand and maintain. Any suggestions?


My recommendation tends to be stuff written with Expectations. We love that at World Singles.


Not sure where to point you for an example body of such test code tho'


It's funny how some people just can't get past the parens tho'... even tho' it's usually less actual "syntax" than whatever their home language is.


Cheers @seancorfield. I agree regarding syntax. Once you’ve ‘seen the light’, it’s fine but initial impressions count.


@mccraigmccraig good call. TBH I was being a little lazy and hoped individuals might know of a specifically good example. Your example complies 😉 Very easy to understand; the ‘in your face data’ nature of the tests is a great exampler. Thank you.


there's also quite a lot of java interop there to make java-heads feel more at home


@iecya Nice to see you in the 'public' team FiFi! 👋


@paulspencerwilliams expectations is cool but TBH I think you just need to get used to the syntax as most tests I see are in clojure.test. I used to prefer midje and the expectations for their readability but the tooling is just stronger around clojure.test and in the end that won the argument for me.


I always liked speclj


i always found myself wrangling weird macroexpansion errors with midje


i've fallen back to clojure.test because it's ok and omnipresent


though it's crappy for async code (there is async support in cljs.test), but i'm not sure any of the other frameworks are any better for async code


@glenjamin looked at speclj but not used it.. I like rspec


@agile_geek thanks 😄 i finally made my debut!


@iecya Well welcome. We're all pretty friendly here.


(when not grumpy)


mccraigmccraig: This sounds like an urban legend 😉


@mccraigmccraig - Thanks for the S3 stuff yesterday. I am going to put a pin in it and use the Filesystem until I have time to do the modifications I need. Have forked the gists so that I can let you see the modifications when I get to it 🙂


and then comes jdk9 to crush your dreams and hopes :)


gawd mutability suxx


jdk gotta keep delaying.


Re: tooling / clojure.test — just FYI, Expectations now supports all the clojure.test tooling because it has named tests via defexpect (so the CIDER / ProtoREPL / etc workflows should all “just work”)… but it would be nice to get more widespread usage and more feedback 🙂