[rspec-users] RSpec and namespaced controllers
bruno.bornsztein at gmail.com
Sat Mar 24 15:15:51 EDT 2007
I'm running into a problem with RSpec/Rails and namespaced controllers.
I've got a controller called 'TenantsController' in app/controllers
and another called 'Admin::TenantsController' in app/controllers/admin
In spec/controllers/, I have a tenants_controller_spec.rb. In
spec/controllers/admin/ I have another tenants_controller_spec.rb.
Both specs run correctly when I run them individually from ruby (ie ruby
spec/controllers/admin/tenants_controller.rb), but the namespaced
tenants_controller.rb (inside /admin) fails when I run the tests from rake.
I think there's a collision between the two controller name, or else
RSpec/Rails isn't parsing the second controller's name correctly.
For reference, in /admin/tenants_controller_spec.rb, I'm setting the
Any thoughts on what might be going wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users