2

I always get this when I test with rspec-rails:

DEPRECATION WARNING: Initialization autoloaded the constant Ability.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload Ability, for example,
the expected changes won't be reflected in that stale Class object.

This autoloaded constant has been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.
 (called from <top (required)> at MyApp/config/environment.rb:5)

How can I fix this deprecation warning?

Chiara Ani
  • 918
  • 7
  • 25

0 Answers0