Skip to content

Instantly share code, notes, and snippets.

@vinibaggio
Created September 2, 2009 21:20
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 vinibaggio/179964 to your computer and use it in GitHub Desktop.
Save vinibaggio/179964 to your computer and use it in GitHub Desktop.
module AllowMacros
def self.included(mod)
mod.extend ClassMethods
end
module ClassMethods
FILTER_METHOD = :check_permission
def it_should_allow(roles, options={})
it "should have allow rule for roles #{roles_msg}" do
controller.respond_to?(FILTER_METHOD).should be_true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment