Closed crystal-williams-brown closed 1 year ago
This is probably an issue on packs. Packwerk doesn't do anything to load code. It is a static analysis tool. Could you please open an issue there?
Sorry, I moved it to packs-rails https://github.com/rubyatscale/packs-rails/issues/64
Description I'm attempting to modularize a Rails app. I am starting with one section. I moved the files into a single folder. I installed packwerk and packs-rails. I placed the folder with the files inside of a packs folder at the root of the app. I moved the test files into an rspec folder inside of the section folder. My test fail with the error NameError: uninitialized constant for every single class. All of these classes are in the folder. I don't know why the tests are not treating them like classes.
To Reproduce
Expected Behaviour I expected the tests to still recognize the class names though they are moved into a pack.
Screenshots This is the package.yml in the pack folder
And here is the one at the root
Here is the file system
Here is the .rspec
Here is one of the failing tests
Version Information
Additional Context I've tried directly requiring packwerk in the files, having the test files specify they are model tests, moving files around, and changing the names of classes. I've also started over from scratch, following the guidance in the instructions and using different tutorials.