You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Just add `:mimic` to your list of dependencies in `mix.exs`:
17
17
```elixir
18
18
defdepsdo
19
19
[
20
-
{:mimic, "~> 1.12", only::test}
20
+
{:mimic, "~> 2.0", only::test}
21
21
]
22
22
end
23
23
```
@@ -101,6 +101,10 @@ Calculator
101
101
102
102
assert Calculator.add(1, 3) == {:add, 1, 3}
103
103
assert Calculator.add(4, 5) == {:add, 4, 5}
104
+
Calculator.add(1, 4)
105
+
106
+
# Will raise error because more than 2 calls to Calculator.add were made and there is no stub
107
+
# ** (Mimic.UnexpectedCallError) Calculator.add/2 called in process #PID<.*> but expectations are already fulfilled
104
108
```
105
109
106
110
With `use Mimic`, verification `expect/4` function call of is done automatically on test case end. `verify!/1` can be used in case custom verification timing required:
0 commit comments