antonmi / espec_phoenix

ESpec for Phoenix web framework.
MIT License
138 stars 33 forks source link

Init generates the wrong @endpoint #55

Closed edwinthinks closed 5 years ago

edwinthinks commented 5 years ago

Hello,

I'am running Phoenix 1.4 and I noticed that when I ran:

MIX_ENV=test mix espec_phoenix.init

It would generate this in spec/espec_phoenix_extend.ex:

  def channel do
    quote do
      alias MyApp.Repo

      @endpoint MyApp.Endpoint
    end
  end

Whereas it should be adding "Web" after MyApp like this:

  def channel do
    quote do
      alias MyApp.Repo

      @endpoint MyAppWeb.Endpoint
    end
  end