Sha256: 1c3cb3ac17ee1509aefdf7ccd6b295546a27e3299d79858e932641a7b4ac8640
Contents?: true
Size: 838 Bytes
Versions: 1
Compression:
Stored size: 838 Bytes
Contents
require 'spec_helper' require 'support/ability_model' describe Authority::Authorizer do before :each do @ability_model = AbilityModel.new @authorizer = Authority::Authorizer.new(@ability_model) end it "should take a resource instance in its initializer" do @authorizer.resource.should eq(@ability_model) end describe "class methods" do Authority::ADJECTIVES.each do |adjective| method_name = "#{adjective}_by?" it "should respond to `#{method_name}`" do Authority::Authorizer.should respond_to(method_name) end end end describe "instance methods" do Authority::ADJECTIVES.each do |adjective| method_name = "#{adjective}_by?" it "should respond to `#{method_name}`" do @authorizer.should respond_to(method_name) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
authority-0.0.1 | spec/authority/authorizer_spec.rb |