fixing namespace controller resource spec

This commit is contained in:
Ryan Bates 2011-09-28 13:43:34 -07:00
parent 2160183e86
commit 092b510a2f

View File

@ -37,11 +37,10 @@ describe CanCan::ControllerResource do
module MyEngine module MyEngine
class Project < ::Project; end class Project < ::Project; end
end end
project = MyEngine::Project.create! project = MyEngine::Project.create!
@params.merge!(:controller => "MyEngine::ProjectsController", :action => "show", :id => project.id) @params.merge!(:controller => "MyEngine::ProjectsController", :action => "show", :id => project.id)
resource = CanCan::ControllerResource.new(@controller) resource = CanCan::ControllerResource.new(@controller, :load => true)
resource.load_resource resource.process
@controller.instance_variable_get(:@project).should == project @controller.instance_variable_get(:@project).should == project
end end