The "easiest" way is:
ControllerName.new(Merb::Request.new(Rack::MockRequest.env_for("url")) if
you want a controller.
If you just want output, you can do:
response = merb.visit("/path/to/url"), which will return a struct.
response.body is the body
response.headers is the headers
response.status is the status code
-- Yehuda
On Tue, Dec 2, 2008 at 8:17 PM, Praveen <[EMAIL PROTECTED]> wrote:
>
> Hello
> We all know 'merb -i' is super useful for ad-hoc tests. I use it
> always to do various tests on my models. However, I'd like to know how
> to instantiate controllers from within the interactive shell and get
> the rendered output . Is there any wiki tutorial someone can point
> to?
>
> Thanks much.
>
> >
>
--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---