From: "Jon A. Lambert" Date: 2005-10-02T03:48:35+09:00 Subject: Re: Flexmock question John Wilger wrote: > You can't mock out the #send method on a FlexMock object, because that > method is already defined (the usual Object#send method). Your choices > here are to either reopen the FlexMock class and undef the #send > method (probably not a good idea), or just create your own MockSocket > class and define the methods you need in it. class FlexMock undef_method(:send) end I'm not using #send on any of my other mocked objects so this works. I checked that if I do hit code that uses #send on a mock object, other than my mock socket, it will cause the test to fail. Thanks -- J Lambert