Open drewbourne opened 14 years ago
added support for matching method and property names with a RegExp:
mock(permissions).methods(/^can/)
stub(slotmachine).setters(/^slot\d/).arg(Number);
stub(slotmachine).getters(/^slot\d/).returns(10);
TODO add support to test spies
added support for matching methods, getters, and setters by RegExp to test spies.
As a convenience allow stubbing and mocking multiple methods or properties by providing a RegExp or Matcher as the method name.