[rspec-users] Aidmock - safe mocking

Wilker wilkerlucio at gmail.com
Mon Jan 17 07:53:00 EST 2011

You are right Dave,

I was thinking about it, but with a different interface, like:


but I mean your is cooler, and user will be able to apply mocks/stubs

I will work on it today :)

Wilker Lúcio
Kajabi Consultant
+55 81 82556600

On Mon, Jan 17, 2011 at 1:45 AM, David Chelimsky <dchelimsky at gmail.com>wrote:

> On Jan 16, 2011, at 5:52 PM, Wilker wrote:
> Hi guys,
> I launched some days ago a new project that aims to make the use of mocks
> safer.
> This is the URL of project: https://github.com/wilkerlucio/aidmock
> The basic idea is to make user define interfaces of classes, when user
> defines the class interface (which is something like defining method
> signatures on C or Java) Aidmock automatic generate some sanity check
> specs, these specs will verify if class has the method defined, and if
> it respect arity of interface.
> And more important, when user create mocks while developing specs, it
> will verify all defined mocks, and check if they are respecting
> defined interface.
> You can saw more about project motivation here(with some example of
> why it exists): https://github.com/wilkerlucio/aidmock/wiki/Motivation
> This project is a kind of experimental one, with a different idea, and
> any feedback will be really welcome.
> Hi Wilker,
> There have been numerous requests for a tool that would warn when mocking
> method that don't exist, and I think it is great that you are working on
> aidmock.
> In the Motivation wiki page, you say that you recommend using real objects
> instead of mocks in all cases. I don't agree with this, as an important
> basis for mock objects is the idea that we should mock roles, not objects
> [1].
> I imagine that aidmock could work equally well with real objects and mock
> objects if there were a hook to tell a mock what interfaces it is allowed to
> stub. Something like:
> account = double('account').constrained_to(MyInterface)
> [1] http://static.mockobjects.com/files/mockrolesnotobjects.pdf
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110117/d601a7b7/attachment.html>

More information about the rspec-users mailing list