dry-rb / dry-rails

The official dry-rb railtie
https://dry-rb.org/gems/dry-rails
MIT License
270 stars 27 forks source link

Remove constants from app namespace before rename #40

Closed diegotoral closed 4 years ago

diegotoral commented 4 years ago

When setting up a custom name for the auto inject constant the code left untouched the previous constant which caused specs and the application code itself to work when referring to the old constant name. By removing the constant from app's namespace before redefining it with another name we solve the problem.

diegotoral commented 4 years ago

@solnic I found this problem while working on another pull request to #21 and it seem like it was introduced by my previous pr #29.