Skip to content

Instantly share code, notes, and snippets.

@moxley
Last active June 24, 2019 02:10
Show Gist options
  • Save moxley/b4924f6b7a9c41474b8cb7bd48fc45b5 to your computer and use it in GitHub Desktop.
Save moxley/b4924f6b7a9c41474b8cb7bd48fc45b5 to your computer and use it in GitHub Desktop.
Error message when running controller test for Elixir Phoenix
(UndefinedFunctionError) function MyApp.FooController.init/1 is undefined or private

The problem is that your test module is named the same as your controller. Instead, it should have Test appended to the end of the module name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment