This looks really cool but I’m getting the following error
mix test --trace test/problem11_test.exs:13
warning: function data/0 is unused
│
16 │ defp data do
│ ~
│
└─ lib/problem11.ex:16:8: Problem11 (module)
Running ExUnit with seed: 86835, max_cases: 1
Excluding tags: [:test]
Including tags: [location: {"test/problem11_test.exs", 13}]
Problem11Test [test/problem11_test.exs]
* test greets the world (77.5ms) [L#12]
1) test greets the world (Problem11Test)
test/problem11_test.exs:12
** (UndefinedFunctionError) function Problem11."REPATCH-PRIVATE-data"/0 is undefined or private
code: assert "sucka" == private Problem11.data()
stacktrace:
(ex_euler 0.1.0) Problem11."REPATCH-PRIVATE-data"()
test/problem11_test.exs:13: (test)
Finished in 0.2 seconds (0.2s async, 0.00s sync)
1 test, 1 failure
shell returned 2
Press ENTER or type command to continue
here’s the spec
defmodule Problem11Test do
use ExUnit.Case, async: true
use Repatch.ExUnit
import Repatch, only: [private: 1]
doctest Problem11
setup do
Repatch.spy(Problem11)
end
test "greets the world" do
assert "sucka" == private Problem11.data()
end
end






















