My directory structure is:
lib/expr/interp.ex
lib/expr.ex
where interp.ex is a protocol with implementation which uses expr.ex.
I have a interp_test.exs and when I run “mix test” the errors results:
** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
(elixir) lib/io.ex:445: IO.chardata_to_string(nil)
(elixir) lib/path.ex:289: Path.relative_to/2
test/interp_test.exs:5: (module)
(elixir) lib/code.ex:370: Code.require_file/2
(elixir) lib/kernel/parallel_require.ex:57: anonymous fn/2 in Kernel.ParallelRequire.spawn_requires/5
===============
The first 5 lines of the interp_test.exs is:
require Expr.Interp
defmodule InterpTest do
use ExUnit.Case
doctest Expr.Interp
=================
I marked this as an issue with Protocol because before I changed to Protocols the tests work without issues. Before Protocol interp was a Module with one function.
Thanks