jjh42 / mock

Mocking library for Elixir language
MIT License
639 stars 81 forks source link

Fix README.md file #102

Closed lcezermf closed 5 years ago

lcezermf commented 5 years ago

The function assert_called() does not exists, the correct approach is to use assert called().

I tried a lot use assert_called() but it raises an error, so I accidentally change to assert called() and worked fine.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling f1f28acac893a76f18958a5ac95458bd061a49c1 on lccezinha:fix-readme into f5b8a3781c2f8c5e6a7ea8819ba1db78c85963ea on jjh42:master.

Olshansk commented 5 years ago

assert_called is a macro defined here: https://github.com/jjh42/mock/blob/master/lib/mock.ex#L155

It should only be called on modules that were mocked.

lcezermf commented 5 years ago

@Olshansk I tried to use following the same approach that exists in the documentation, but with no success.

Could you give an example of how to use? Then I'll close this issue.

Olshansk commented 5 years ago

https://github.com/jjh42/mock/blob/master/test/mock_test.exs#L67

lcezermf commented 5 years ago

@Olshansk thanks a lot, closing it.