On 2006-07-22, at 13:02 , James Adam wrote:
However, because of the way that Rake::TestTask works (loading a new
Ruby interpreter which churns through the test cases), the Rails
environment is never actually made available to any plugins.
Really? I think my plugins' tests need the environment, and run fine.
Am I missing something obvious here?
The fact is testing plugins suck.
Plugins may interact with rails on many levels. Some just alter
activerecord, others need the full stack and add stuff to numerous
places, so, basically, the only sure fire way to test a plugin is to
test it within an app.
Right now, what I'm doing is developing my plugins inside a test app.
I'm experimenting with creating the tests either inside the plugin
dir, or using the app's tests directly.
That kinda sucks, though, because when I package the plugin, I won't
be packaging the test app along with it.
I was wondering if it's possible to make a tiny rails app contained
within a single file, or at least a lot less files than a standard
app, so that it could be placed inside the plugin test dir, and used
for testing the plugin, instead of relying on the current app the
plugin is installed into.
But really, that was not related to your question, was it? Sorry
about the rant/hijack :P
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core