Piotr Solnica argues in “Mutation testing with Mutant” that traditional test coverage is an unsuffiecient metric to consider code being thoroughly tested, and advocates a “mutator” approach (Mutant, Heckle) to discover variance in test cases.
The idea is correct, but the argument and the code in the article is weak. In fact, for the example at hand, code coverage (eg. with SimpleCov) actually does a very good job of communicating weak spots of the code.
In the end, the code either has a purpose, or not. If it doesn't “do anything“, as was the case with the original code in the article, it has not to be properly tested. It has to be removed.
$ bundle install
$ bundle exec ruby -I . book_test.rb