Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: edgurgel/mimic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6c93cb0b0cd462aa65fb98632c92abad4ce87421
Choose a base ref
..
head repository: edgurgel/mimic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 436f73e721f4f14d6c43c4719b5e75c3b9b24dce
Choose a head ref
Showing with 13 additions and 13 deletions.
  1. +13 −13 test/mimic_test.exs
26 changes: 13 additions & 13 deletions test/mimic_test.exs
Original file line number Diff line number Diff line change
@@ -911,24 +911,24 @@ defmodule Mimic.Test do
describe "copy/1 with duplicates does nothing" do
setup :set_mimic_private

for i <- 1..10000, do: (
for i <- 1..10000 do
test "stubs still stub #{i}" do
parent_pid = self()
parent_pid = self()

Mimic.copy(Calculator)
Mimic.copy(Calculator)
Mimic.copy(Calculator)
Mimic.copy(Calculator)

Calculator
|> stub(:add, fn x, y ->
send(parent_pid, {:add, x, y})
:stubbed
end)
Calculator
|> stub(:add, fn x, y ->
send(parent_pid, {:add, x, y})
:stubbed
end)

Mimic.copy(Calculator)
Mimic.copy(Calculator)

assert Calculator.add(1, 2) == :stubbed
assert_receive {:add, 1, 2}
assert Calculator.add(1, 2) == :stubbed
assert_receive {:add, 1, 2}
end
)
end
end
end