Skip to content

Commit

Permalink
fixing spec for Inherited Resource parent loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Mar 8, 2011
1 parent 2c2fa30 commit 3a07d62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/cancan/inherited_resource_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 3a07d62

Please sign in to comment.