Tuesday, April 8, 2008

Testing Rails Plugins

I've begun my long-prolonged delay into test-driven development by creating retro tests for the AssociationFu plugin. Since plugins are tested in isolation from the Rails environment, this is a good place to start since I'll have to learn how to simulate the Rails framework and construct/mock/stub it.

Here's what I've gleaned thus far:

The file test/test_helper.rb is where the test framework is constructed. Since this plugin depends on database access, we'll have to connect to a database. (more to follow...)

0 comments: