On Friday, July 31, 2015 at 6:44:21 AM UTC-4, simo wrote:
>
> I don't have problems with Test::Mojo. Its okay for testing actual 
> request/response and real data.
>
> But I would like to test it as unit tests, just input => output. No data 
> in a database or creating actions in controller just for the tests, 
> unnecessary Mojo startup, ...
>

Test::Mojo has some features that let you test template rendering directly. 
from the Test::Mojo pod...

         my $c = $t->app->build_controller;
         ok $c->render(template => 'foo'), 'rendering was successful';
         is $c->res->status, 200, 'right status';
         is $c->res->body, 'Foo!', 'right content';

hope this helps,
jay
   

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to