http://bit.ly/1aN4Ftt Erlang, version R16B https://www.erlang-solutions.com/downloads/download-erlang-otp $ brew tap homebrew/versions $ brew link erlang-r16 Elixir
do @moduledoc """ A record that keeps information about the test. It is received by formatters and also accessible in the metadata under the key `:test`. """ end def handle_cast({:test_finished, ExUnit.Test[failure: nil] = test}, config) do if config.trace do IO.puts success(trace_test_result(test)) else IO.write success(".") end { :noreply, config.update_tests_counter(&1 + 1) } end
do "Amrita could not understand your `provided`:\n" <> " " <> Macro.to_string(exception.form) <> "\n" <> " Make sure it uses this format: [Module.fun |> :return_value]" end end def prerequisites(forms) do prerequisites = Enum.map(forms, fn form -> extract(form) end) Provided.Prerequisites.new(prerequisites) end defp extract({:|>, _, [{fun, _, args}, value]}) do { module_name, function_name } = extract(fun) { module_name, function_name, args, value } end defp extract({:., _, [ns, method_name]}) do { extract(ns), method_name } end defp extract({:__aliases__, _, ns}) do Module.concat ns end defp extract(form) do raise Error.new(form: form) end end
do "Amrita could not understand your `provided`:\n" <> " " <> Macro.to_string(exception.form) <> "\n" <> " Make sure it uses this format: [Module.fun |> :return_value]" end end def prerequisites(forms) do prerequisites = Enum.map(forms, fn form -> extract(form) end) Provided.Prerequisites.new(prerequisites) end defp extract({:|>, _, [{fun, _, args}, value]}) do { module_name, function_name } = extract(fun) { module_name, function_name, args, value } end defp extract({:., _, [ns, method_name]}) do { extract(ns), method_name } end defp extract({:__aliases__, _, ns}) do Module.concat ns end defp extract(form) do raise Error.new(form: form) end end