Wednesday, 16th April 2014.

Posted on Sunday, 19th October 2008 by charpi

I worked on erl_mock in order to publish my spike around mocks in erlang. When I was almost ready to make the package, something interesting happened: my tests failed. More precisely, they failed when run by the ‘future’ version of extremeforge. After the first surprise, I find the reason. Extremeforge use 2 nodes, the first [...]

Tags: , ,
Posted in Uncategorized | Comments (2,912)

Posted on Thursday, 9th October 2008 by charpi

In my previous post, I described a way to mock module by replacing them. Today, I’ll post a version closer to other mock library. Basically, I create on mock module on the fly and forward all calls to a process. You can tell to this process how to answer for each calls. Here is the [...]

Tags: ,
Posted in Uncategorized | Comments (2,281)

Posted on Wednesday, 8th October 2008 by charpi

In my previous post, I wrote a test to specify a lazy mock. In my mind, a lazy mock consists to replace the implementation of one module by another one at runtime. Here is the implementation of the lazy mock test -module(mock). -export([replace_module /2]). replace_module (Module, Mock_module) -> uninstall (Module), {ok, Binary} = file: read_file [...]

Tags: ,
Posted in Uncategorized | Comments (1,859)

Posted on Friday, 3rd October 2008 by charpi

People coming from object oriented programming often use mock object in their unittest. The main question is do we need mock when programming with erlang ? . The answer could be we don’t need any mock library because it’s already part of the language. Let me explain a little more my vision of mock in [...]

Tags: ,
Posted in Uncategorized | Comments (4,015)

About me Downloads IPhone