the following is lifted from the 'Gotchas' section of my own internal
wiki, i hope it help's someone else some day.
Can't load namespaced controllers
Errors:
warning: toplevel constant Finance referenced by Member::Finance
OR
uninitialized constant Finance
Cause:
a namespaced controller /
Someone made some sense out of this.
http://code.dblock.org/warning-toplevel-constant-xyz-referenced-adminxyz
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-u
Top 4 lines of pages_controller_spec.
require 'spec_helper'
require 'spec_controllers_helper'
describe PagesController do
before(:each) do
controller.stub!(:app_initialization).and_return(true)
end
Top 4 lines of admin/pages_controller_spec.
require 'spec_helper'
require 'spec_controlle
None of this makes any sense :)
dblock@dblock-magenta:~/source/Gravity/dblock$ find . -name "*.rb" |
xargs grep PagesController
./spec/controllers/admin/pages_controller_spec.rb:describe
Admin::PagesController do
./spec/controllers/pages_controller_spec.rb:describe PagesController
do
./app/contro
> To make the warning go away, you can use ::PagesController where you
> mean the top-level PagesController.
I tried saying ::PagesController in the 2 places it's declared (the
controller itself and the spec), no difference.
___
rspec-users mailing list
Hi,
On Sat, Apr 16, 2011 at 00:02, dblock 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
> warn
On Apr 15, 2011, at 11:02 AM, dblock 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:
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: warni