I have a method in my elixir app, let's say Some.Module.func/1
, that returns a tuple of two numbers. I'm writing tests in ExUnit and only need to test the first element in tuple and don't really care about the second one.
So far, I've tried doing this:
test "some method" do
assert Some.Module.func(45) == {54, _}
end
But I just get this error when running the test:
Compiled lib/some.ex
Generated some app
** (CompileError) test/some_test.exs:7: unbound variable _
(stdlib) lists.erl:1353: :lists.mapfoldl/3
(stdlib) lists.erl:1354: :lists.mapfoldl/3
Why isn't this working, and how can I ignore unneeded results in my tests?