/var/log/orava

Petri Wessman's weblog

Rails, Passenger, Shoulda

My Rails coding project is proceeding, I’m currently working on getting a user permission system in shape so I can open up my alpha test Exalted character tool to a friend who is interested in checking it out. Still quite a bit of work to do, but it’s proceeding nicely. A big helper has been the fact that I’ve dived pretty deep into test-oriented programming here – I probably have more test code than “actual” code, and have most of the model and controller functionality covered. It’s nice to type ”rake test” and see hundreds of tests get run in an instant, it gives a nice instant sanity check to any changes I make to what is at times somewhat tricky code.

I’ve been using some of the new Rails 2.1 features; named scopes are useful, as are many other helpful additions. In addition, I recently decided to give Phusion Passenger a whirl and was pleasantly surprised to be able to move all the current Rails apps on my server (including this blog) to run under it with minimal hassle. Much nicer than Mongrel, especially since it does automatic load balancing “out of the box” – and it makes Rails as easy to host as PHP, which is extremely welcome.

One other nice recent find was the Shoulda plugin, which provides syntactic sugar on top of Rails unit and functional tests. Very cool, and encourages grouping of tests into functional blocks. In addition, it provides macros which generate tons of tests for restful resources with just a few lines of code.

Published on by Orava, tags , , ,

comment Rails, Passenger, Shoulda

Trackbacks are disabled

Powered by Publify – Thème Frédéric de Villamil | Photo Glenn