[Backgroundrb-devel] backgroundrb and autotest

James Hughes hughes.james at gmail.com
Wed Jul 19 13:41:26 EDT 2006

(Ezra, sorry for the repeat, I didn't hit reply-all the first time so
this didn't get to the list)
On 7/18/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:
> On Jul 18, 2006, at 11:51 AM, James Hughes wrote:
> > Hi,
> > I'm trying to run the test that comes via the worker generator.  The
> > test works fine when running 'rake test_functional', but when the

Scratch that test_functional above. The generated test is a *unit*
test, so no wonder the functional tests were running without error. ;]

Anyway, the upshot is that this is not an autotest issue, but a
testing issue in general.

[goes away and hacks a bit]

Ok, found the problem; in the generated test, these two lines need to
be reversed so that the backgroundrb lib is loaded before the worker

require "#{RAILS_ROOT}/lib/workers/task_checker_worker"
require "#{RAILS_ROOT}/vendor/plugin/backgroundrb/backgroundrb.rb"

Also, it should be /vendor/plugins/, not /vendor/plugin.

So, lines 2 and 3 of your test end up like the following:

require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/backgroundrb.rb"
require "#{RAILS_ROOT}/lib/workers/task_checker_worker"


James Hughes
Web application developer
Vancouver, BC

"Developing a coherent political analysis is in many respects
contingent upon an ability to connect one context to another, a
process not dissimilar to playing the kid's game of dot-to-dot."
 - Ward Churchill, from '"A Government of Laws"?'

More information about the Backgroundrb-devel mailing list