Skip to content

Commit

Permalink
Fix typo in test description
Browse files Browse the repository at this point in the history
  • Loading branch information
brain-geek committed Jul 17, 2024
1 parent 81740e7 commit 070579b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions lib/mimic.ex
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ defmodule Mimic do
iex> Mimic.stub(Calculator)
...> Calculator.add(2, 4)
** (ArgumentError) Module Calculator has not been copied. See docs for Mimic.copy/1
** (ArgumentError) Module Calculator has not been copied. See docs for Mimic.copy/1
"""
@spec stub(module()) :: module()
Expand Down Expand Up @@ -507,11 +507,11 @@ defmodule Mimic do

defp validate_server_response({:error, {:module_not_copied, module}}, _action) do
raise ArgumentError,
"Module #{inspect(module)} has not been copied. See docs for Mimic.copy/1"
"Module #{inspect(module)} has not been copied. See docs for Mimic.copy/1"
end

defp validate_server_response(_, :copy) do
raise ArgumentError,
"Failed to copy module. See docs for Mimic.copy/1"
"Failed to copy module. See docs for Mimic.copy/1"
end
end
16 changes: 8 additions & 8 deletions test/mimic_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ defmodule Mimic.Test do

test "undefined mocked module" do
assert_raise ArgumentError,
"Module MissingModule has not been copied. See docs for Mimic.copy/1",
"Module MissingModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub_with(MissingModule, InverseCalculator)
end
Expand Down Expand Up @@ -228,7 +228,7 @@ defmodule Mimic.Test do

test "raises if a non copied module is given" do
assert_raise ArgumentError,
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub(NotCopiedModule, :inc, fn x -> x - 1 end)
end
Expand Down Expand Up @@ -356,7 +356,7 @@ defmodule Mimic.Test do

test "raises if a non copied module is given" do
assert_raise ArgumentError,
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub(NotCopiedModule, :inc, fn x -> x - 1 end)
end
Expand Down Expand Up @@ -436,7 +436,7 @@ defmodule Mimic.Test do

test "raises if a non copied module is given" do
assert_raise ArgumentError,
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub(NotCopiedModule, :inc, fn x -> x - 1 end)
end
Expand Down Expand Up @@ -569,7 +569,7 @@ defmodule Mimic.Test do

test "raises if a non copied module is given" do
assert_raise ArgumentError,
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub(NotCopiedModule, :inc, fn x -> x - 1 end)
end
Expand Down Expand Up @@ -607,7 +607,7 @@ defmodule Mimic.Test do

test "raises if a non copied module is given" do
assert_raise ArgumentError,
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub(NotCopiedModule, :inc, fn x -> x - 1 end)
end
Expand Down Expand Up @@ -653,7 +653,7 @@ defmodule Mimic.Test do
end
end

describe "reject3/ private mode" do
describe "reject/3 private mode" do
setup :set_mimic_private

test "expect no call to function" do
Expand All @@ -680,7 +680,7 @@ defmodule Mimic.Test do

test "raises if a non copied module is given" do
assert_raise ArgumentError,
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
"Module NotCopiedModule has not been copied. See docs for Mimic.copy/1",
fn ->
stub(NotCopiedModule, :inc, fn x -> x - 1 end)
end
Expand Down

0 comments on commit 070579b

Please sign in to comment.