Setup a testdirectory for a Rails Plugin
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 tes开发者_如何学编程t 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?
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'
精彩评论