[Backgroundrb-devel] bdrb w/ functional tests?
gethemant at gmail.com
Tue Feb 5 15:01:45 EST 2008
On Feb 5, 2008 6:57 AM, Ian Smith-Heisters <heisters at greenriver.org> wrote:
> I was running into errors trying to run functional tests on
> controllers that use MiddleMan, since my test environment doesn't have
> a bdrb server running.
> BackgrounDRb::BdrbConnError: Not able to connect
> vendor/plugins/backgroundrb/lib/backgroundrb.rb:39:in `ask_work'
> The relevant lines of test/test_helper.rb looks like this:
> require File.expand_path(File.dirname(__FILE__) + "/bdrb_test_helper")
> require *Dir.glob(RAILS_ROOT + '/lib/workers/*.rb')
> (I had to remove the "require 'test_helper'" line in bdrb_test_helper
> for that to work).
> Since I only use #ask_work, I stubbed this out in the bdrb_test_helper:
> module BackgrounDRb
> # Added WorkerProxy stub so that functional tests will run
> class WorkerProxy
> def ask_work(arg)
> return true
> which seems to work for the moment. It'd be nice if this stuff Just
> Worked, though.
Cool, it will be commited.
More information about the Backgroundrb-devel