Hi everyone,

As the meeting wasn't on tonight I thought some of you might have been
desperately craving some sort of extracurricular ruby, so I hope no-one
minds me sharing version 0.1.1 of my first ruby gem:

https://github.com/robwold/compact


It came about as I watched Joe Rainsberger's talk 'Integration tests are a
scam' (https://www.infoq.com/presentations/integration-tests-scam/) and
became interested in the thinking outlined there. (Gary Bernhardt discusses
some advantages of this approach in his well-known 'Boundaries' (
https://www.destroyallsoftware.com/talks/boundaries) talk.) The TL;DR:


   1. If you want to prove the 'basic correctness' of your code with true
   unit tests, then when you use a test double (mock/stub) in a
   'collaboration' test, write a 'contract' test that some class in your code
   really behaves the way you've said your mock does.
   2. This approach is actually more likely to throughly test the basic
   correctness of your code than the corresponding integration tests,
   because integration tests are hard to write and slow to run, so nobody
   writes enough of them to actually exercise all the possible paths of
   execution in your code.


He said it would be nice to have a tool that helps you automate this
correspondence. Sandi Metz mentioned some tools intended to help with this
in her talk 'The magic tricks of testing' (
https://www.youtube.com/watch?v=URSWYvyc42M), but they seem to have largely
fallen by the wayside. Have a look at the README if you're interested in
how I'm trying to approach the problem. It'd be great if anyone who's
interested in this approach to testing had any feedback that could help
mould this into something that is actually useful.

Cheers,
Rob

-- 
You received this message because you are subscribed to the Google Groups 
"North West Ruby User Group (NWRUG)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nwrug-members+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/nwrug-members/CA%2BXHHoL%3DmMWbAbfUHnTAPe3K%2BfFhTVJapE4%3DjvMh91GUDj0Xeg%40mail.gmail.com.

Reply via email to