Re: [Mojolicious] Re: Testing internal method

2020-04-27 Thread Alberto Mijares
On Mon, Apr 27, 2020 at 11:46 PM Glen wrote: > > He's implying that you wouldn't test this internal method with Test::Mojo; > Test::Mojo is for testing endpoints. Thank you, guys. This was the explanation I was needing. Tests running now. Alberto Mijares -- You received this message becau

Re: [Mojolicious] Re: Testing internal method

2020-04-27 Thread Stefan Adams
I think Scott and Glen are both pointing out that your method in your controller class that is not associated with a route ("filter") is not a method of your controller, but instead in the "model" portion of MVC. It might help you to move that code outside of the controller class, and then it'll m

Re: [Mojolicious] Re: Testing internal method

2020-04-27 Thread Glen
He's implying that you wouldn't test this internal method with Test::Mojo;  Test::Mojo is for testing endpoints. If you want to test a specific method that is not an endpoint, load the module manually and test it with Test::More. On Apr 27, 2020, 11:32 PM -0400, Alberto Mijares , wrote: > > > >

Re: [Mojolicious] Re: Testing internal method

2020-04-27 Thread Alberto Mijares
On Mon, Apr 27, 2020, 7:09 PM Scott Wiersdorf wrote: > Test::Mojo can help you test your views and controllers, as well as your > internal helpers: > > > https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Testing.pod#Testing-application-helpers > Thank you Scott. I did rea

[Mojolicious] Re: Testing internal method

2020-04-27 Thread Scott Wiersdorf
Test::Mojo can help you test your views and controllers, as well as your internal helpers: https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Testing.pod#Testing-application-helpers If you are wanting to test your application *model* (i.e., non-Mojolicious code), you shoul