tomakehurst/wiremock — pull request #84 by rowanhill (2013-12-28 12:08:50+00:00)
Title: Add acceptance test around requiring scenario states with no scenario name

Hi,

As I was implementing scenarios support in wiremock-php, I realised I wasn't sure what would happen if I used whenScenarioStateIs() without also using inScenario(), so I wrote a quick test to be sure: it turns out the whenScenarioStateIs calls are effectively ignored. I thought it might be worth contributing to document the behaviour.

It might also be worth noting in the documentation?

Alternatively, MappingBuilder#build might want to ensure a scenarioName is set if requiredScenarioState or newScenarioState and throw an exception otherwise? That's the approach I've taken in wiremock-php. I'd be happy to put in a PR to that effect if you'd like.

Rowan