Pattern: Const assigned in wronf file
Issue: -
Checks for a constant assigned in a file that does not match its owning scope. The Rails autoloader can't find such a constant, but sometimes people "get lucky" if the file happened to be loaded before the method was defined.
# bad
# foo/bar.rb
module Foo
BAZ = 42
end
# good
# foo.rb
module Foo
BAZ = 42
end