Skip to content

Instantly share code, notes, and snippets.

@kirkconnell
Created September 20, 2011 21:53
Show Gist options
  • Select an option

  • Save kirkconnell/1230523 to your computer and use it in GitHub Desktop.

Select an option

Save kirkconnell/1230523 to your computer and use it in GitHub Desktop.
CanCan spec error.
Failures:
1) CanCan::ModelAdapters::ActiveRecordAdapter should fetch only associated records when using with a scope for conditions
Failure/Error: category1.articles.accessible_by(@ability).should == [article1]
expected: [#<Article id: 1, name: nil, published: nil, secret: true, priority: nil, category_id: 1>],
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Article id: 1, name: nil, published: nil, secret: true, priority: nil, category_id: 1>]
+[]
# ./spec/cancan/model_adapters/active_record_adapter_spec.rb:139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment