I’m currently writing my first plugin, which is in the acts_as style,
but I can’t for the life of me work out how to get the testing working.
The plugin is called ‘acts_as_task_list’, and I want to create a model
just for testing this, so my test currently looks like this:
This model is just for testing the plugin.
class Contract < ActiveRecord::Base
The first bit doesn’t work, so I haven’t got as far
as this bit yet.
class ActsAsTaskListTest < Test::Unit::TestCase
Replace this with your real tests.
As I expected, this test explodes because Ruby hasn’t loaded up the
plugin and included the acts_as_task_list into ActiveRecord::Base, but I
don’t seem to be able to find out how to make this happen. I’ve tried
requiring the init.rb file for the plugin, but Ruby complains that it
can’t find the source file.
Although there’s plenty of help from Google, here and the Wiki on
writing a plugin, I can’t find a single piece of information to tell me
what I’m doing wrong in the testing. If anyone can help it would be much