diff options
Diffstat (limited to 'spec/support/pundit.rb')
| -rw-r--r-- | spec/support/pundit.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/support/pundit.rb b/spec/support/pundit.rb new file mode 100644 index 000000000..66225e82f --- /dev/null +++ b/spec/support/pundit.rb @@ -0,0 +1,13 @@ +require 'pundit/rspec' + +module Support + module ApplicationPolicy + def create_user_context(user:, referential:) + OpenStruct.new(user: user, context: {referential: referential}) + end + end +end + +RSpec.configure do | c | + c.include Support::ApplicationPolicy, type: :policy +end |
