Skip to content

Commit 2c1a5da

Browse files
committed
Rename test helper for clarity
1 parent 91013e6 commit 2c1a5da

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

test/drawing_test.exs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ defmodule Mudbrick.DrawingTest do
22
use ExUnit.Case, async: true
33
use ExUnitProperties
44

5-
import Mudbrick.TestHelper,
6-
only: [
7-
invalid_colour: 0,
8-
output: 2
9-
]
10-
115
alias Mudbrick.Path
126

137
alias Mudbrick.Path.{
@@ -17,6 +11,13 @@ defmodule Mudbrick.DrawingTest do
1711
Rectangle
1812
}
1913

14+
alias Mudbrick.TestHelper
15+
16+
import Mudbrick.TestHelper,
17+
only: [
18+
invalid_colour: 0
19+
]
20+
2021
test "can add drawings to a page" do
2122
import Mudbrick
2223

@@ -175,7 +176,7 @@ defmodule Mudbrick.DrawingTest do
175176
end
176177

177178
defp operations(f) do
178-
output(fn _ -> f.() end, Mudbrick.Path.Output)
179+
TestHelper.wrapped_output(fn _ -> f.() end, Mudbrick.Path.Output)
179180
|> Enum.map(&Mudbrick.TestHelper.show/1)
180181
|> Enum.reverse()
181182
end

test/mudbrick/text_block_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Mudbrick.TextBlockTest do
22
use ExUnit.Case, async: true
33

4-
import Mudbrick.TestHelper, only: [output: 2, bodoni_regular: 0]
4+
import Mudbrick.TestHelper, only: [bodoni_regular: 0]
55

66
alias Mudbrick.Font
77
alias Mudbrick.TextBlock
@@ -451,7 +451,7 @@ defmodule Mudbrick.TextBlockTest do
451451
end
452452

453453
defp output(f) do
454-
output(f, Mudbrick.TextBlock.Output) |> Enum.reverse()
454+
Mudbrick.TestHelper.wrapped_output(f, TextBlock.Output) |> Enum.reverse()
455455
end
456456

457457
defp operations(ops) do

test/test_helper.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defmodule Mudbrick.TestHelper do
5151
@example_png
5252
end
5353

54-
def output(f, output_mod) when is_function(f) do
54+
def wrapped_output(f, output_mod) when is_function(f) do
5555
import Mudbrick
5656

5757
{doc, _contents_obj} =

0 commit comments

Comments
 (0)