[MacRuby-devel] Default Test Framework

Josh Ballanco joshua.ballanco at apple.com
Thu Oct 8 22:58:03 PDT 2009

Hey all!

So, as I've been working on a recipe for testing with MacRuby, I  
realized that it would probably be good to discuss the topic of  
"blessing" a particular test suite. Obviously, with macgem all of the  
Ruby test suites are available to use, but for the purposes of  
tutorials and whatnot, having one default that ships with MacRuby  
would help reduce confusion and at least get people started on the  
road to testing. Personally, I think whatever ships with MacRuby  
should ideally be light-weight, extensible, and integrated. In other  
words, the heavy hitters like Test::Unit, RSpec, and Shoulda are out.  
That leaves:

-- minitest: The "blessed" test library of Matz Ruby. It's very  
minimal, but documentation is somewhat lacking. I also couldn't find  
an easy spot to hook into the API to customize output format. Still,  
if it's good enough for Matz Ruby...

-- bacon: Small, and output is easily customized. I'm currently  
looking at what would be required to get bacon's output to play nicer  
with Xcode. The one unknown (for me, at least) is popularity/ 
familiarity in the larger Ruby community.

-- OCUnit: This is the Objective C test library that ships with Xcode.  
We could put a thin wrapper around it, and then not worry about having  
to ship a separate test library. The major downside to OCUnit is that  
it's not very "Ruby-ish".

I'm quite enamored with bacon, but I'm worried about the possibility  
that developers coming from Matz Ruby might start to expect minitest  
to be included. That might be a remote possibility, though, as it  
seems like minitest isn't currently that popular. If there are others  
I missed, or if you disagree with any points, speak up!



More information about the MacRuby-devel mailing list