josephwilk / amrita

A polite, well mannered and thoroughly upstanding testing framework for Elixir
200 stars 28 forks source link

Can't use module methods within tests. #123

Open samdoiron opened 9 years ago

samdoiron commented 9 years ago

It is often helpful to use module methods within a test, to avoid repetition.

Eg:

defmodule SomeTest do
  fact "can add quotes" do
    quotify some_string |> "\"#{some_string}\""
  end

  def some_string, do: "some string"
end

This is possible using ExUnit, but in Amrita it generates an unused warning for some_string and fails with undefined function some_string/0