Matt S Trout wrote: > On Wed, May 16, 2007 at 10:11:56AM +0100, Matt Lawrence wrote: > >> Ah yes. You don't normally forward to a Model. If you're testing a >> controller (or, I suppose, a view), it's best to forward, otherwise you >> get a similar error if the controller method you're calling forwards to >> another method itself. >> > > Maybe that means there's a case for adding a context($uri) export to C::Test > >
I suppose that would come in useful in some situations, but the question is how much stuff would get done before the context gets returned. You could stop before you call the action, having called the relevant begin and auto methods, but then what could you usefully test other than the action itself? If you return the context after the request has been finalised, it would be useful for ensuring the internal state is as you expect, as well as the actual response. But it might not be so useful for unit testing to have a finalised context. Matt _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
