drewbourne / mockolate

fake chocolate, mock objects and test spies for AS3
http://mockolate.org/
MIT License
146 stars 26 forks source link

MockolateRule should provide mock(), stub(), verify() #30

Closed drewbourne closed 13 years ago

drewbourne commented 13 years ago

To save a few imports and make syntax completion a bit nicer, the MockolateRule should provide mock(), stub() and verify().

[Rule]
public var mocks:MockolateRule = new MockolateRule();

[Mock]
public var flavour:Flavour;

[Test]
public function example():void 
{
    mocks.mock(flavour).method("combine").args(Flavour).once();
    ...
    mocks.verify(flavour);
}
drewbourne commented 13 years ago

Added nice, strict, partial, mock, stub, verify, record, replay, expect, expectArg to MockolateRule.