Elixir ExUnit: test module not available

I follow this guide: http://elixir-lang.org/getting-started/mix-otp/agent.html

So, in my Elixir project, I have the lib/kv/bucket.exs and the test for it is test/kv/bucket_test.exs .

When I run the mixing test, I get the following error: ** (UndefinedFunctionError) undefined function KV.Bucket.start_link/0 (module KV.Bucket is not available) Did I miss something?

+6
source share
1 answer

Thus, the module should use the .ex extension instead of .exs , and you need to run mix compile to compile the new module. After that, mix test can find the module, and everything works as expected.

+10
source

All Articles