PracticeCraft / spirit-exercises

Exercise bank for Spirit
1 stars 2 forks source link

"Basic Types" exercises #2

Closed waseem-medhat closed 6 days ago

waseem-medhat commented 1 week ago

This is mostly done now that PR #3 was merged, but let's leave it open until the generator task is done and the exercises (and their tests) are tested properly.

nikfp commented 1 week ago

@waseem-medhat I discovered a file name issue with ExUnit, tests have to end in _test.exs and be somewhere in the test directory to be picked up properly. I did a direct commit to main to rename the test file in this PR, tested it, and it's working. Merging my not-clean-but-working generator code now.

waseem-medhat commented 1 week ago

@nikfp I think we may need to readjust a couple of things due to moving the tests files to tests/ instead of lib/...

This way any exercise module would only consist of only one file in a directory, so I think it makes more sense to drop the directories altogether, i.e., change our file structure from something like lib/exercises/basic_types/exercises.ex to something like lib/exercises/basic_types.ex. And we should also rename the modules to properly reflect that structure, so Spirit.Exercises.BasicTypes.

nikfp commented 6 days ago

@waseem-medhat This does make more sense. It's an easy enough change to make too. I'm on board with it.