I previously released DoubleAgents, a test-double library for Visualworks Smalltalk.
Since the initial release, I’ve added several enhancements:
#beAnnouncer. This is useful for testing objects that expect to subscribe to announcements from a collaborator. Expect a blog post in a few weeks talking about the issues involved and why I implemented this the way I did.
#disallow:a message. This is a way to explicitly specify that a particular message will not be sent to an object. It can also override an expectation or stub that was configured in a
This latter change allows allows for expectations like the following:
This expectation will be satisfied if the arguments are some number between 40 and 42 inclusive, an even number, and a block.
As before, DoubleAgents’ primary home is the Cincom Public Store Repository. Check there for the latest version. I’ve also put a snapshot of the current version of DoubleAgents on GitHub. The Readme file on GitHub includes documentation of the API of DoubleAgents if you’d like more information before diving in.
DoubleAgents is licensed under the MIT license.