On 10/24/07, Shane Mingins <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> Has anyone mocked a call like the following for backgroundrb?
>
> MiddleMan.new_worker(:class => :admin_email_worker, :args => params[:email])
>
> I cannot seem to find the correct manner to do it.
>
> Would have liked to be able to do
> MiddleMan.should_receive(:new_worker).with(:class => :admin_email_worker,
> :args => {"body" => "my message"})I conditionally load the backgroundrb plugin. require 'middleman_rails_init' if ENV["use_backgroundrb"] in vendor/plugins/backgroundrb/init.rb Then I stick a class MiddleMan; end in spec_helper.rb so the constant is defined. Pat _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
