Mocketry 30 for Pharo

I am glad to present simplest mocks for Pharo.
In this version Mocketry is dramatically improved and changed.  I try to provide most simple way to stub any message to any object and to verify any occurred behaviour.
Here is short example:
mock := Mock new.
mock stub someMessage willReturn: 1000.
mock someMessage should be: 1000.
mock should got someMessage.
mock should not got anotherMessage.
rect := 0@0 corner: 2@3.
rect stub width willReturn: 1000.
rect area should be: 3000 “area = width * height”.
rect should got width.
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: