[Backgroundrb-devel] [ANN] BackgrounDRb 1.0 pre-release available now
hemant kumar
gethemant at gmail.com
Tue Dec 11 06:24:46 EST 2007
> At one point with the old version it was fairly straight-forward to
> test workers, but that broke at one point. Could you give any
> pointers writing tests for workers in the new version?
>
Hi Brandon,
update your bdrb copy from svn and run rake backgroundrb:setup and you
should have a RAILS_ROOT/test/bdrb_test_helper.rb file.
Now, all your worker test cases can go in RAILS_ROOT/test/unit
directory, just make sure that you require bdrb_test_helper file, and
you can write test cases.
For example:
require File.join(File.dirname(__FILE__) + "/../bdrb_test_helper")
require "god_worker"
context "When god worker starts" do
setup do
god_worker = GodWorker.new
end
end
I hope this helps.
More information about the Backgroundrb-devel
mailing list