nimblehq / elixir-templates

Our optimized Elixir templates used in our projects
https://nimblehq.co
MIT License
86 stars 6 forks source link

Remove the reference to `ExVCR.Mock` in FeatureCase by default #253

Closed byhbt closed 2 years ago

byhbt commented 2 years ago

Issue

Although don't choose to install the ExVCR.Mock, the FeatureCase still references the ExVCR.Mock library.

image

Expected

Steps to reproduce

  1. Generate new web variant project, choose no when initializing the addons Would you like to add the ExVCR addon? [Yn] - [n]

  2. Run mix test

  3. The CLI has this error:

==> acme_platform
Compiling 20 files (.ex)
Generated acme_platform app

== Compilation error in file test/acme_platform_web/features/home_page/view_home_page_test.exs ==
** (CompileError) test/acme_platform_web/features/home_page/view_home_page_test.exs:2: module ExVCR.Mock is not loaded and could not be found
    (elixir 1.13.4) expanding macro: Kernel.use/2
    test/acme_platform_web/features/home_page/view_home_page_test.exs:2: AcmePlatformWeb.HomePage.ViewHomePageTest (module)
    (acme_platform 0.1.0) expanding macro: AcmePlatformWeb.FeatureCase.__using__/1
    test/acme_platform_web/features/home_page/view_home_page_test.exs:2: AcmePlatformWeb.HomePage.ViewHomePageTest (module)
    (elixir 1.13.4) expanding macro: Kernel.use/1