On 2 November 2013 02:39, John Napiorkowski <jjn1...@yahoo.com> wrote: > Catalyst::Test uses Plack::Test under the hood. That mangle_response stuff > is mostly evil :) > > Sounds like you are saying you'd like to apply Plack Middleware during > testing. The latest dev release on CPAN lets you configure middleware via > configuration, so you could have some middleware in your test configuration. > This use case is one of the reasons I added this feature, so that we could > manage middleware for catalyst inside of catalyst configuration.
That's correct -- I'd like to apply some plack middleware, which is a mocked-up-for-testing version of some middleware we run in production. Since the app now depends upon it, being able to specify it in the catalyst config would be fine. > If you don't like that approach, I could be talked into a patch to > Catalyst::Test that would let you declare additional middleware in the test > case. > > I'd prefer this over messing with Catalyst::Test internals. One of the hard > things about trying to move Catalyst forward is that we've expose a ton of > API that we fear to change since we don't know who is overriding what in the > Darkpan. Ideally I'd like to see people use Plack Middleware for jobs > involving modifying the request and response, since that is something its > great at, and the API is just a code ref, so its very well decoupled (could > even be used outside of Catalyst). Thanks John. I'll keep an eye out for the new release! (but will be hacking up something nasty and temporary until then so I can get some unit tests passing again..) Cheers, Toby _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/