Open obmarg opened 8 years ago
I was just trying to use a fixture, and accidentally wrote:
@fixtures [:metainfo] test "blah" do end
instead of using @tag fixtures: [:metainfo]. And got this wierd error message:
@tag fixtures: [:metainfo]
** (ArgumentError) argument error :erlang.apply([:metainfo], :name, []) anonymous fn/3 in ExUnitFixtures.Imp.Preprocessing.resolve_dependencies/2 (elixir) lib/enum.ex:1473: Enum."-reduce/3-lists^foldl/2-0-"/3 lib/ex_unit_fixtures/imp/preprocessing.ex:65: ExUnitFixtures.Imp.Preprocessing.resolve_dependencies/2 lib/ex_unit_fixtures/imp/preprocessing.ex:41: ExUnitFixtures.Imp.Preprocessing.preprocess_fixtures/2 (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6 (stdlib) erl_eval.erl:877: :erl_eval.expr_list/6 (stdlib) erl_eval.erl:404: :erl_eval.expr/5
Which took me surprisingly long to figure out. I wrote this project and I'm making this mistake, so that's not good. Need to find a way to make things less error prone (or explain things better if making them error prone)
Might be good to remove the reliance on module attributes for defining fixtures, which I think would prevent this somewhat. Not sure though.
I was just trying to use a fixture, and accidentally wrote:
instead of using
@tag fixtures: [:metainfo]
. And got this wierd error message:Which took me surprisingly long to figure out. I wrote this project and I'm making this mistake, so that's not good. Need to find a way to make things less error prone (or explain things better if making them error prone)