I'm developing Mojo::UserAgent::Mockable, a drop-in replacement for 
Mojo::UserAgent that is capable of recording and playing back HTTP 
interchanges. Currently, the way I'm handling playback is by rewriting the 
URL to point to an internal Mojolicious instance 
(https://github.com/PopeFelix/Mojo-UserAgent-Mockable/blob/master/lib/Mojo/UserAgent/Mockable.pm#L117)
 
and setting $ua->server->app to the internal application 
(https://github.com/PopeFelix/Mojo-UserAgent-Mockable/blob/master/lib/Mojo/UserAgent/Mockable.pm#L197)

This seems to be working well so far. However, if I test it against a local 
Mojolicious app (e.g. as 
in 
https://github.com/PopeFelix/Mojo-UserAgent-Mockable/blob/master/t/010_playback_local.t#L34)
 
it of course stops working, because I've set the internal server app to 
something else.  Is there a better way to serve recorded responses than 
what I'm doing currently?  I'd like this to be able to work with both local 
and remote apps.

KP

-- 
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