On Oct 20, 2008, at 11:00 am, Lawrence Pit wrote:

> Ashley, your response perfectly words what I was thinking reading this
> thread..
>
> I haven't done much with merb yet, but just reading the code, I would
> guess that if you include Merb::Test::ControllerHelper in your spec,
> then you'd be helped with the method
> merb-core:/lib/merb-core/test/helpers#dispatch_to ?
>
> from the doc:
>
>      # Dispatches an action to the given class. This bypasses the
> router and is
>      # suitable for unit testing of controllers.
>
>      # ==== Example
>      #   dispatch_to(MyController, :create, :name => 'Homer' ) do
> |controller|
>      #     controller.stub!(:current_user).and_return(@user)
>      #   end



Hi Lawrence,

Thanks for the pointer there.  I saw this module in the RC1 gem  
source, but all the methods (apart from, for some reason, #put) were  
marked deprecated.  So I assumed that this was going to be removed.   
But I've looked at the latest source on Github, and the deprecations  
have been removed.  So I guess I'm good to go with this.

Have yet to actually use it, though, so I'll let you know how I get on.

Ashley

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to