derwiki-adroll / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Fluent Interface #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Would there be any chance of adding a fluent interface to mock? 
https://github.com/burrowsa/mockextras seems to provide it, but it seems like 
something that is potentially a core feature for a mocking library

Original issue reported on code.google.com by thomas.j...@gmail.com on 30 Jul 2013 at 8:07

GoogleCodeExporter commented 9 years ago
I don't know what you mean by a "fluent interface" and can't find a description 
from the project you link to.

Original comment by fuzzyman on 30 Jul 2013 at 8:09

GoogleCodeExporter commented 9 years ago
I've found some examples here:

https://github.com/burrowsa/mockextras/blob/master/mockextras/_fluent.py

That looks awful! Sorry, but that's for a very different style of mocking API 
than the one mock provides.

Original comment by fuzzyman on 30 Jul 2013 at 8:11

GoogleCodeExporter commented 9 years ago
I can understand if you don't like the style. Lots of other mock libraries 
(mockito, googlemock, etc) support it though. It's just syntactic sugar, I 
don't think it changes the actual style of mocking.

FYI: http://en.wikipedia.org/wiki/Fluent_interface

Original comment by thomas.j...@gmail.com on 30 Jul 2013 at 8:22

GoogleCodeExporter commented 9 years ago
You can find a fluent interface facade for mock at:
https://github.com/aelgru/fluentmock

It is available on PyPI too.

Original comment by ael...@gmail.com on 9 Mar 2014 at 11:16