Skip to content

Instantly share code, notes, and snippets.

@ncherro
Created August 21, 2013 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ncherro/6295189 to your computer and use it in GitHub Desktop.
Save ncherro/6295189 to your computer and use it in GitHub Desktop.
RSpec::Matchers.define :permit do |*args|
match do |permission|
expect(permission.allow?(*args)).to be_true
end
end
RSpec::Matchers.define :permit_param do |*args|
match do |permission|
expect(permission.allow_param?(*args)).to be_true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment