Forum: Ruby on Rails Re: plugins don't bubble syntax errors up correctly

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2007-01-21 23:03
(Received via mailing list)
> I have this issue:

I don't seem to have that issue - I'm still interested if it's resolved.

I generated a plugin with script/generate plugin, then I tossed a
correctly-named class into the lib folder, and I put its first test in
test folder.

The error message is

NameError: uninitialized constant MyClassTest::MyClass

That simply means I need to require 'my_class', right? So I crow-bar it
with this:

require File.dirname(__FILE__) + '/../lib/yar_wiki.rb'

Oookay. Now something in MyClass depends on RAILS_ROOT, so I add that.
MyClass misses YAML, and I skid to a halt.

Why am I rebuilding the Rails environment for this test case? I'm runing
rake test in the folder vendor/plugin/my_class, so The System should
take care of all this paperwork, like the rest of Rails, right?

  Phlip <-- NOT a blog!!!
This topic is locked and can not be replied to.