Fixtures with polymorphic association not working
问题 I'm trying to implement the Rolify gem but have trouble adding fixtures with a scope for it. The last line of the (model) test below fails because currently the moderator role seems to be given to @user globally instead of only for organization one. The fixtures below aren't using resource_id and resource_type , which are mentioned in the gem documentation for fixtures, but I'm not sure how to use them. How should I set the scope for the moderator role to only organization one? roles.yml