# Working Effectively with Unit Tests Rough Draft Complete

DevFeed: [Working Effectively with Unit Tests Rough Draft Complete](<https://devfeed.tech/articles/working-effectively-with-unit-tests-rough-draft-complete-31907.md>)

Original publisher: [Read original article](<http://blog.jayfields.com/2014/06/working-effectively-with-unit-tests.html>)

Author: Jay (noreply@blogger.com)

Published: 2014-07-01T00:48:00Z

Content type: opinion

Language: en

Sources: [Jay Fields](<https://devfeed.tech/sources/jay-fields.md>)

Topics: [unit tests](<https://devfeed.tech/topics/unit-tests.md>), [test](<https://devfeed.tech/topics/test.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Git](<https://devfeed.tech/topics/git.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>)

Tags: [books](<https://devfeed.tech/tags/books.md>), [git](<https://devfeed.tech/tags/git.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>), [wewut](<https://devfeed.tech/tags/wewut.md>), [writing](<https://devfeed.tech/tags/writing.md>)

## AI overview

The author reflects on completing the rough draft of Working Effectively with Unit Tests, publishing it early on Leanpub, and using reader feedback to improve the book. The article also describes a script and output-file comparisons used to verify that the book's passing and failing examples continue to behave as intended.

## Source excerpt

I finally put the finishing touches on the rough draft of Working Effectively with Unit Tests. It's been an interesting journey thus far, and I'm hoping the attention to detail I've put into the rough draft will translate into an enjoyable read. What I did poorly: I'd written the book's sample before I ever put it on leanpub. Before a book is published you can collect contact and price information from those who are interested. However, once you publish and begin selling, you no longer have the ability to collect the previously mentioned information. I published and began selling my book immediately - and forfeited my chance to collect that information. What I did well: I published early and often. I can't say enough nice things about leanpub. I've gotten tons of feedback on example style, writing style, typos, and content. One reader's suggestion to switch to Kevlin Henney's Java formatting style made my book enjoyable to read on a Kindle. I had twitter followers apologizing for "being pedantic and pointing out typos", and I couldn't have been happier to get the feedback. Each typo I fix makes the book more enjoyable for everyone. If you're going to write a book, get it on leanpub asap and start interacting with your audience. What I learned from Refactoring: Ruby Edition (RRE): RRE contains errors, far too many errors. I vowed to find a better way this time around, and I'm very happy with the results. Every example test in the book can be run, and uses classes also shown in the book. However, writing about tests is a bit tricky: sometimes "failure" is the outcome you're looking to document. Therefore, I couldn't simply write tests for everything. Instead I piped the output to files and used them as example output in the book, but also as verification that what failed once continued to fail in the future (and vice versa). WEwUT has a script that runs every test from the book and overwrites the output files. If the output files are unchanged, I know all the passing