Fixtures in Rails 2

Posted by Eric Artzt Wed, 21 May 2008 06:37:00 GMT

As part of my attempts to upgrade tinySIS to Rails 2, I am updating the test fixtures. I am starting with a basic set of fixtures to cover subject areas, contracts, users, enrollments, and settings. I’ll expand this fixture set later, but the goal right now is to get a test database up and limping so I can write a basic set of functional smoke-tests to verify the app before I deploy. Kind of sad, as the app has been in production for almost two school years now - and despite the lack of automated testing, it’s quite stable - but I am trying to move it in the 20th century.

I found a couple good resources on the new fixtures stuff:

Thanks, Ryans.

I won’t reiterate the great info in the above postings. I will just show you excerpts from my starter fixture set. I started by dumping my old test database to yml (the database was created using fixture_scenarios, which I did get to somewhat-work under Rails 2 but decided to go with the native Rails fixtures instead).

My mythological school is kind of inbred.


Functional shared Google calendars

Posted by Eric Artzt Wed, 14 May 2008 17:13:00 GMT

The Google Embeddable Calendar Helper rocks. You can create multiple Google calenders under your account and create one merged calender view showing all of them. We created a shared calendar for Church of the Resurrection, Hosanna Assemblea de Dios, and Holy Apostles church here:

http://resurrectionbellevue.org/happening/calendar

You can color code the various calenders. The view provides a drop-down selector where users can pick which calenders to display – and a “save as” feature off the print button that creates a PDF. Nice.


Rails on Dreamhost

Posted by Eric Artzt Tue, 13 May 2008 04:48:00 GMT

Dreamhost just rolled out Passenger / mod_rails — a simplified way to run Rails apps on Dreamhost shared servers. Here are my notes on setting up a nice Dreamhost environment for your Rails app. I use a separate user for each Rails app. My apps run pretty well. They are not fast to boot up, but once running, they are reasonably snappy - I don’t host any high traffic sites on my shared domains.

One lovely thing about mod_rails - when your app is screwed up and won’t boot, you get a helpful error screen with a Rails stack trace. Huge.