reneeb / Mojolicious-Command-generate-localplugin

0 stars 1 forks source link

Make generated tests pass #3

Closed afresh1 closed 3 years ago

afresh1 commented 3 years ago

I got this repo from the pullrequest.club but without any Issues I wasn't sure what to work on. Of course, I had no real idea what the project did and so I tried it out and realized that the generated code didn't pass its generated tests. After much digging, I figured out that Mojolicious::Plugins won't find the TestPlugin if you try to load it as "test_plugin". It always looks for the camelized version in a namespace, and then the exact name. It never tries to load the camelized version by itself.

This PR adjusts the tests to be generated to load the Plugin by class name instead of short name and runs the generated tests as part of the test suite.

reneeb commented 3 years ago

Thanks. Will release a new version to CPAN soon.