Good example where I use viruses is stubbing real objects in Mocketry. I will announce it soon. You can do this:rect := 0@0 corner: 2@3rect stub area willReturn: 1000.rect area "=> 1000".rect origin "=> 0@0".OK..I should take a look to the code...but...it looks to me that stub the only thing it does is to create the proxy and then the #become: ??
rect := 0@0 corner: 2@3rect stub width willReturn: 1000.rect area "=> 3000"
Free forum by Nabble | Edit this page |