A Fresh Cup is Mike Gunderloy's software development weblog, covering Ruby on Rails and whatever else I find interesting in the universe of software. I'm a full-time Rails developer and contributor, available for long- or short-term consulting, with solid experience in working as part of a distributed team. If you'd like to hire me, drop me a line. I'm also the author of Rails Rescue Handbook and Rails Freelancing Handbook.

Navigation

A Fresh Cup

Notes on Rails and other development

Entries in testing (3)

Monday
Mar082010

Double Shot #663

I'll just be over here in the corner, trying to write some code.
Monday
Feb012010

Easy rcov with Test::Unit and Rails 2

Yesterday, I needed test coverage numbers for an application using Rails 2.3 and plain old Test::Unit (still my test framework of choice). This proved to be a good deal more difficult than I expected: there are so many forks of the original rcov code, and so much disparate advice on how to get it hooked up, that I spent a great deal of unprofitable time reading before I got the right combination. Hopefully this short list will save you from doing the same:
  1. Install the relevance-rcov gem. This is the stable and maintained fork.
  2. Install the commondream rcov_plugin. This has the best set of working rake tasks I've found.
  3. Add coverage/* and test/coverage/* to your .gitignore.
  4. Run rake test:coverage to generate coverage results.
  5. Open /coverage/index.html in your project to view the results.
Tuesday
Jan052010

Double Shot #619

Looks like the next RailsBridge BugMash is going to focus on Rails 3, just before the beta. This could be interesting.
  • Lemon - Yet another ruby unit test framework, this one focused on making sure there's a test case for every method.
  • Reincarnate - How to make a ruby class inherit from itself.
  • Sphinx Monitoring Plugin - The latest nice touch from the Scout guys.
  • Cromwell - Wrapper for ruby signal handling to allow you to easily create unkillable scripts.
  • Stencil - Free-text (ie, not assuming HTML) templating system.
  • Rubinius 1.0.0-RC2 Released - Ruby in Ruby moves along.
  • Firebug 1.6a1 - The next branch of Firebug (for Firefox 3.6/3.7) has gone live.