antonmi / espec_phoenix

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

module ESpec.Phoenix.Extend is not loaded and could not be found #5

Closed lee-dohm closed 9 years ago

lee-dohm commented 9 years ago

I've tried to use espec_phoenix a couple times over the last few days. I follow the instructions in the README, but when I attempt to actually run the specs, I get the error from the title:

** (CompileError) spec/models/food_spec.exs:2: module ESpec.Phoenix.Extend is not loaded and could not be found
    (elixir) expanding macro: Kernel.use/2
    spec/models/food_spec.exs:2: MealTracker.FoodSpec (module)
    expanding macro: ESpec.Phoenix.__using__/1
    spec/models/food_spec.exs:2: MealTracker.FoodSpec (module)
    (elixir) expanding macro: Kernel.use/2
    spec/models/food_spec.exs:2: MealTracker.FoodSpec (module)

The espec_phoenix_extend.ex file is right where the init procedure left it, so I'm not sure why I would be getting this issue.

antonmi commented 9 years ago

Hi! Please ensure you have Code.require_file("spec/phoenix_helper.exs") present in spec_helper.exs And Code.require_file("spec/espec_phoenix_extend.ex") in phoenix_helper.exs.

lee-dohm commented 9 years ago

Awesome, thanks!

antonmi commented 9 years ago

:thumbsup: