From 3a07d62782b47adb7f72af8215289410e57c2d1c Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Tue, 8 Mar 2011 15:39:15 -0800 Subject: [PATCH] fixing spec for Inherited Resource parent loading --- spec/cancan/inherited_resource_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/cancan/inherited_resource_spec.rb b/spec/cancan/inherited_resource_spec.rb index 09dc9d7c..a0051fd8 100644 --- a/spec/cancan/inherited_resource_spec.rb +++ b/spec/cancan/inherited_resource_spec.rb @@ -25,9 +25,9 @@ @controller.instance_variable_get(:@project).should == :project_resource end - it "index should load through @controller.parent when parent" do + it "index should load through @controller.association_chain when parent" do @params[:action] = "index" - stub(@controller).parent { :project_resource } + stub(@controller).association_chain { @controller.instance_variable_set(:@project, :project_resource) } CanCan::InheritedResource.new(@controller, :parent => true).load_resource @controller.instance_variable_get(:@project).should == :project_resource end