Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing spec for Inherited Resource parent loading

  • Loading branch information...
commit 3a07d62782b47adb7f72af8215289410e57c2d1c 1 parent 2c2fa30
@ryanb authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/cancan/inherited_resource_spec.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.