in reply to How to use Test::MockModule better

First off, Test::Builder won't help because it's used to build the testing infrastructure, not specific tests.

As for what you're looking for, I can't tell you how to solve it. But, I can tell you how we solved it in DBD::Mock for database work. We used what we call sessions - sequences of expected SQL statements, their expected bind parameters, and what they should be returning. We set one up, then call the code under test. Either the session passes or it doesn't.

It sounds like you really want to set up a session of HTTP requests with the responses lined up in a row so you can test a specific scenario.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?