Open Bastes opened 8 months ago
Hello! I had this exact issue and I found this post on the elixir forums, seems the helpers have to be enabled explicitly in phoenix 1.7.
TL;DR: MyApp.Router.Helpers
can be enabled in the MyAppWeb
module, change the use Phoenix.Router, helpers: false
line to use Phoenix.Router, helpers: true
and the MyApp.Router.Helpers
module becomes available for ESpec.
Tinkering with
espec_phoenix
with the latestphoenix
version I'm finding these annoying errors that I can't seem to fathom when I run my specs for a simple controller test (copy-pasted-adapted from the pre-built phoenix tests):(my app being named
Ecs
)Versions:
The spec:
From what I understand it's something to do with the
EcsWeb.Router.Helpers
somehow not being defined at the time theESpec.Phoenix.Extend.__using__/1
macro expects it, but why it's not is currently out of my grasp. I'll be happy to provide more details if I can :)