eproxus / meck

A mocking library for Erlang
http://eproxus.github.io/meck
Apache License 2.0
813 stars 231 forks source link

Implicit new #80

Closed eproxus closed 10 years ago

eproxus commented 12 years ago

This means get rid of the {not_mocked, Module} error and just run new if there is no Meck process already.

horkhe commented 12 years ago

Certainly doable, but don't we trying to be too smart with that? As a user I would prefer my unit test to fail in this case. Has a need for that came from your personal experience or somebody asked for that?

eproxus commented 12 years ago

It's just something that I thought about, that you would save tons of meck:new(mod) lines for test cases that don't need mocks with options.

edgurgel commented 11 years ago

@eproxus, that would mean:

meck:expect(module, ...).

I would not need to write meck:new if I used expect on a module?

Cool