views:

12

answers:

1

Hi. I started to create a rails plugin which includes some class and instance methods of Controller and Model. I fist tried to setup the tests for the Model.

Add a models directory in my test dir. But i noticed - i need the geokit-rails plugin for my model to be able to "acts_as_mappable"

How to get the plugin into the test dir? I tryied to copy it to /test/plugins/geokit-rails and include it in my test_helper?

require 'geokit'
require PLUGIN_ROOT + '/test/plugins/geokit-rails/lib/geokit-rails.rb'

I get an error from the plugin

MissingSourceFile: no such file to load — geokit-rails/defaults

any suggestions?

A: 

i got the plugin running with some changes in geokit-rails/lib/geokit-rails.rb

dir = File.join(File.dirname(__FILE__))
require dir + '/geokit-rails/defaults'
require dir + '/geokit-rails/adapters/abstract'
require dir + '/geokit-rails/acts_as_mappable'
require dir + '/geokit-rails/ip_geocode_lookup'
Henning