Created
September 2, 2009 21:20
-
-
Save vinibaggio/179964 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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