[Backgroundrb-devel] backgroundrb and autotest

Ezra Zygmuntowicz ezmobius at gmail.com
Wed Jul 19 13:51:13 EDT 2006


Hi~

On Jul 19, 2006, at 10:41 AM, James Hughes wrote:

> (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
> class:
>
> 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"
>
>
> jh
>
> --  
> James Hughes


Hey James-

	Thanks for that. I just commited this change to the generated test  
case. So it should be fixed now. Good catch.

Thanks
-Ezra











More information about the Backgroundrb-devel mailing list