fix pluralize error on index action when passing resource name - closes #143 again

This commit is contained in:
Ryan Bates
2010-09-07 22:10:16 -07:00
parent 9d915457af
commit a5ff826e40
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ describe CanCan::ControllerResource do
it "should build a collection when on index action when class responds to accessible_by" do
stub(Project).accessible_by(@ability) { :found_projects }
@params[:action] = "index"
resource = CanCan::ControllerResource.new(@controller)
resource = CanCan::ControllerResource.new(@controller, :project)
resource.load_resource
@controller.instance_variable_get(:@project).should be_nil
@controller.instance_variable_get(:@projects).should == :found_projects