Programming Phoenix 1.4 Chapter Testing MVC: undefined function describe/2

Hi,

My next exercise is Testing User Accounts of this book. See next code snippet:

defmodule Rumbl.AccountsTest do
  use Rumbl.DataCase 

  alias Rumbl.Accounts
  alias Rumbl.Accounts.User

  describe "register_user/2" do
    @valid_attrs %{
      name: "User",
      username: "eva",
      credential: %{email: "eva@test", password: "secret"}
    }
    @invalid_attrs %{}

and this is the result of the mix test command:

mix test test/rumbl/accounts/accounts_test.exs

== Compilation error in file test/rumbl/accounts/accounts_test.exs ==
** (CompileError) test/rumbl/accounts/accounts_test.exs:7: undefined function describe/2

I don’t understand why this is an undefined function!

Any idea what is wrong?

Thanks in advance.

Thiel

What is your Elixir version?

My elixir version is:

Elixir 1.7.0 (compiled with Erlang/OTP 19)

Hi,

At the end of the day I uninstalled Erlang, Elixir and Phoenix to make a fresh start.
After that I re-installed Erlang, Elixir and Phoenix and the problem was solved e.q.
I could finish the “Testing MVC” chapter from the Progamming Phoenix book.

Thiel

2 Likes