Right now, using dot-imports with both pegomock and Ginkgo leads to a name collision for the When function. To solve the issue, one can use Ginkgo's --nodot option which will make Describe/Context/It/When and friends available without dot-importing Ginkgo. Afterwards, it's easy to remove all the When aliases from test files. However, it's still an annoying extra step.
Proposals
Providing another name for When in pegomock
We'd introduce a Whenever function which does exactly the same as When, just has a different name. It would look like this:
Right now, using dot-imports with both pegomock and Ginkgo leads to a name collision for the
When
function. To solve the issue, one can use Ginkgo's--nodot
option which will makeDescribe
/Context
/It
/When
and friends available without dot-importing Ginkgo. Afterwards, it's easy to remove all theWhen
aliases from test files. However, it's still an annoying extra step.Proposals
Providing another name for
When
in pegomockWe'd introduce a
Whenever
function which does exactly the same asWhen
, just has a different name. It would look like this:Use package selector for
When
, but not for pegomock matchers