For Bratwurst on Rails I implemented a small application to allow for easy signup. We could've used something like upcoming or wevent, but first we wanted to give people an opportunity to tell us what they like to eat and second, we needed to have room for our sponsors.

As you might imagine the application doesn't do a lot, it comes along with a flashy design, two simple controllers and one model. Nonetheless I wouldn't have felt comfortable to put the application out in the open without some testing. While I'm sure I didn't test every aspect of it, it tests enough of the functionality to ensure it really works.

Bratwurst Tests

Testing is the part of Rails that has really grown on me, and that drew me to Rails in the first place. The integration of the different types of tests, the fixtures, the ease of writing tests, all that should be enough reason to write tests even for the smallest projects.

If you're just getting started with Rails or haven't looked into testing yet, I suggest you do so soon. It can save a lot of trouble. I don't want to say time, because in the beginning that might not be true. It takes a while to get into testing and to get so comfortable with it that it's only natural to start writing a test for your controllers before you even think about opening the browser. But in the long run it's definitely worth it.

The funky Growl notification is courtesy of autotest, by the way. A shame it took me so long, but I just started using it, and right now I can't remember how it was like without it. Notification icons and notification code can be found on the blog of internaut

Tags: rails, testing

Several friends tried out Ruby and Rails over the last months. Apart from the fact that most of them like it, but have to get used to the different syntax, there's one question that popped up several times, and that I've already discussed with several long-time Rails users: What IDE are you using?

The answer I give them is always: I use TextMate. I know, I know, it's not an IDE you're saying. I'm well aware of that and I didn't imply it would be. That statement just implies that I don't feel the need to use one.

I'm aware that NetBeans seems to be the king of the hill right now, when it comes to Ruby and Rails support for a Java-style IDE. The latter is what bothers me about it though. I don't need all the fancy assistants, the dialogs to generate code, and I can live without the code completion. I know it's something that's missing when you're starting with Rails and come from a code-completed background, but the conventional approach makes it easier to get used to the way you deal with the framework. That's my experience at least.

The weird thing about that? When I work with Java that's the stuff I use all that stuff. A powerful IDE takes the pain out of Java. And that's the reason why I don't fancy one for Rails development. There is no pain. If there is one, it's very different from the pain of Java development, and it's not the IDE that could help me then. I work fluently with TextMate and the command line, so I have no urge to from typing to clicking to get things done.

I love seeing how the community is pushing the Java IDEs to be usable for Rails development, but right now it's just not for me.

MarsEdit 2.0 has been released recently. It's been my blog editor of choice for more than two years now, and the UI facelift it got was long overdue. No more drawers, just like Apple Mail, and best of all, Flickr integration.

MarsEdit 2.0 Flickr Browser

Since I use SimpleLog (which I can highly recommend, by the way) which doesn't support file uploads, I use two options: Skitch (for which I have two invites left, if you're up for it) and Flickr. The former is useless other than for quickly dumping a snapshot, but that you can do pretty quickly. Flickr on the other hand is my personal dump of photos, so when posting something about these (like last week, for example), the integration comes in handy.

By the way, while writing your posts in MarsEdit you can get a perfectly usable preview of how it will look like in your blog. I already edited my template accordingly before MarsEdit 2.0 came out, but Daniel Jalkut (author of MarsEdit) posted a blog entry on how to do that.

MarsEdit is among my favourite tools on the Mac, and I highly recommend giving it a go.