7.6. References

One of the best early descriptions of automated test development is Kent Beck's description of JUnit coding, "Test Infected: Programmers Love Writing Tests," available at http://junit.sourceforge.net/doc/testinfected/testing.htm. Beck's early books on Extreme Programming (XP) also describe the process well.

The rcov home page is http://eigenclass.org/hiki.rb?rcov, where you'll find additional options and documentation. FlexMock lives at http://onestepback.org/software/flexmock. The other major Rails framework is called Mocha, and its home page is http://mocha.rubyforge.org. (By the time you read this, Mocha may have been integrated fully into RSpec.)

The RSpec home page is http://rspec.rubyforge.org, which also contains a lot of great documentation on how to use BDD. The classic Martin Fowler piece on mock object testing is available at http://martinfowler.com/articles/mocksArentStubs.html.

Find out more about Shoulda at http://thoughtbot.com/projects/shoulda. I learned more about this plugin at the end of the book writing cycle, and came to like it very much.

There are a couple of other testing tools created by a consulting group that calls itself the Ruby Sadists. A tool called flog (http://ruby.sadi.st/Flog.html) is a complexity metric that identifies the most complex methods in your system as prime candidates for cleanup. Another tool, called heckle (http://ruby.sadi.st/Heckle.html), provides mutation testing for your code, randomly changing part of your code ...

Get Professional Ruby on Rails™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.