Hi, On Sat, Apr 16, 2011 at 00:02, dblock <dblockdot...@gmail.com> wrote: > I have an odd problem. I got controllers in a namespace and > controllers outside of the namespace. For example, I have a > PagesController and a Admin::PagesController. > > When I run rspec from the top, tests pass and I get the following > warning: > > spec/controllers/admin/pages_controller_spec.rb:4: warning: toplevel > constant PagesController referenced by Admin::PagesController > > This makes no sense. I do have a PagesController and an > Admin::PagesController and specs for both that are declared properly.
I would guess it's Ruby trying to warn you that the use of the constant PagesController in Admin::PagesController references the top-level PagesController, not Admin::PagesController. It can't know which one you mean. To make the warning go away, you can use ::PagesController where you mean the top-level PagesController. HTH, Mike _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users