[Backgroundrb-devel] access to lib?
ml at e4net.com
Sun Jul 9 02:19:44 EDT 2006
To answer my own question...
Yes you do need to require any library you use with...
require File.dirname(__FILE__) + '/../testlib.rb'
The problem is if you don't, the task silently fails and you have no idea why, as the expected error
is lost somewhere (see my other posting).
Jim Morris wrote:
> Do I need to do anything special to access classes in RAILS_ROOT/lib from a worker?
> require File.dirname(__FILE__) + '../my_lib.rb'
> or does it do that automatically like a controller does?
> Also if I write a unit test for a worker that is accessing AR, is there anything special needed to
> be done to access fixtures etc to test it?
Jim Morris, http://blog.wolfman.com
More information about the Backgroundrb-devel