I’m pretty sure that your test errors are related to the use of the Mock
library, but I’m not sure what the resolution would be if you still want to use the library (I’m generally not a fan of that approach to mocking). Also running the tests under Elixir 1.10.2 with Erlang 22.1.7 I get the following error:
1) test purchase with valid card (Gringotts.Gateways.GlobalCollectTest)
test/gateways/global_collect_test.exs:92
** (ErlangError) Erlang error: {:compile_forms, {:error, [{[], [{:none, :compile, {:crash, :sys_core_fold, {{:case_clause, {:EXIT, {:function_clause, [{:sys_core_fold, :module, [[{:attribute, 44, :file, {'lib/httpoison.ex', 44}}, {:attribute, 44, :module, HTTPoison_meck_original}, {:attribute, 44, :compile, [:no_auto_import]}, {:attribute, 66, :spec, {{:transformer, 1}, [{:type, 66, :fun, [{:type, 66, :product, [{:type, 66, :pid, ...}]}, {:atom, 0, :ok}]}]}}, {:attribute, 66, :spec, {{:stream_next, 1}, [{:type, 66, :fun, [{:type, 66, :product, [{:remote_type, 66, ...}]}, {:type, 66, :union, [{:type, ...}, {...}]}]}]}}, {:attribute, 66, :spec, {{:request!, 5}, [{:type, 66, :fun, [{:type, 66, :product, [{:type, ...}, {...}, ...]}, {:type, 66, :union, [{...}, ...]}]}]}}, {:attribute, 66, :spec, {{:request, 5}, [{:type, 66, :fun, [{:type, 66, :product, [{...}, ...]}, {:type, 66, :union, [...]}]}]}}, {:attribute, 66, :spec, {{:put!, 4}, [{:type, 66, :fun, [{:type, 66, :product, [...]}, {:type, 66, :union, ...}]}]}}, {:attribute, 66, :spec, {{:put, 4}, [{:type, 66, :fun, [{:type, 66, :product, ...}, {:type, 66, ...}]}]}}, {:attribute, 66, :spec, {{:process_response_body, 1}, [{:type, 66, :fun, [{:type, 66, ...}, {:type, ...}]}]}}, {:attribute, 66, :spec, {{:process_request_headers, 1}, [{:type, 66, :fun, [{:type, ...}, {...}]}]}}, {:attribute, 66, :spec, {{:process_request_body, 1}, [{:type, 66, :fun, [{...}, ...]}]}}, {:attribute, 66, :spec, {{:post!, 4}, [{:type, 66, :fun, [...]}]}}, {:attribute, 66, :spec, {{:post, 4}, [{:type, 66, :fun, ...}]}}, {:attribute, 66, :spec, {{:patch!, 4}, [{:type, 66, ...}]}}, {:attribute, 66, :spec, {{:patch, 4}, [{:type, ...}]}}, {:attribute, 66, :spec, {{:options!, 3}, [{...}]}}, {:attribute, 66, :spec, {{:options, ...}, [...]}}, {:attribute, 66, :spec, {{...}, ...}}, {:attribute, 66, :spec, {...}}, {:attribute, 66, :spec, ...}, {:attribute, 66, ...}, {:attribute, ...}, {...}, ...], [:binary, :return_errors, :debug_info, :no_spawn_compiler_process, :from_core, :no_auto_import]], [file: 'sys_core_fold.erl', line: 109]}, {:compile, :"-select_passes/2-anonymous-2-", 3, [file: 'compile.erl', line: 675]}, {:compile, :"-internal_comp/5-anonymous-1-", 3, [file: 'compile.erl', line: 399]}, {:compile, :fold_comp, 4, [file: 'compile.erl', line: 426]}, {:compile, :internal_comp, 5, [file: 'compile.erl', line: 410]}, {:compile, :"-do_compile/2-anonymous-0-", 2, [file: 'compile.erl', line: 207]}, {:meck_code, :compile_and_load_forms, 2, [file: '/home/jason/dev/forks/tmp/gringotts/deps/meck/src/meck_code.erl', line: 71]}, {:meck_proc, :backup_original, 3, [file: '/home/jason/dev/forks/tmp/gringotts/deps/meck/src/meck_proc.erl', line: 363]}, {:meck_proc, :init, 1, [file: '/home/jason/dev/forks/tmp/gringotts/deps/meck/src/meck_proc.erl', line: 206]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}, [{:compile, :"-select_passes/2-anonymous-2-", 3, [file: 'compile.erl', line: 675]}, {:compile, :"-internal_comp/5-anonymous-1-", 3, [file: 'compile.erl', line: 399]}, {:compile, :fold_comp, 4, [file: 'compile.erl', line: 426]}, {:compile, :internal_comp, 5, [file: 'compile.erl', line: 410]}, {:compile, :"-do_compile/2-anonymous-0-", 2, [file: 'compile.erl', line: 207]}, {:meck_code, :compile_and_load_forms, 2, [file: '/home/jason/dev/forks/tmp/gringotts/deps/meck/src/meck_code.erl', line: 71]}, {:meck_proc, :backup_original, 3, [file: '/home/jason/dev/forks/tmp/gringotts/deps/meck/src/meck_proc.erl', line: 363]}, {:meck_proc, :init, 1, [file: '/home/jason/dev/forks/tmp/gringotts/deps/meck/src/meck_proc.erl', line: 206]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}]}], []}}