cabbage-ex / cabbage

Story BDD tool for executing elixir in ExUnit
MIT License
141 stars 33 forks source link

`import_*` only works for compiled modules #31

Closed rawkode closed 7 years ago

rawkode commented 7 years ago

Hi,

This probably isn't really an issue, I'd just like to understand why I can't import_steps from a .exs file?

My use-case is here, where I'm re-using steps across a few features:

https://github.com/GT8Online/weave/blob/master/test/loaders/environment_test.exs

mgwidmann commented 7 years ago

Your mix.exs file only specifies to compile folders "test/support" as seen here: https://github.com/GT8Online/weave/blob/master/mix.exs#L55

When you've placed .ex files within "test/steps". You'll have to also include that folder if you want it compiled before the exs files are interpreted (meaning the modules will be available at that time and work as expected).

rawkode commented 7 years ago

Ah! Awesome. Thank you, @mgwidmann 🤘