Sha256: aa9e4350f583e0bfe42ba2e09634203c193025ba2710deb23106f7c94c3929e3
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
require 'spec_helper' require 'fixtures/models' class MyOwnPermit < CanTango::Permit::UserType def initialize ability super end protected def calc_rules can :read, Article end end describe CanTango::Permit::ClassMethods do subject { MyOwnPermit } it "should be the permit for the :admin account" do subject.permit_type.should == :user_type end it "should not be an account permit" do subject.account_name.should == nil end it "should not be an account permit" do subject.permit_name.should == :my_own end it "should have a finder" do subject.finder.should be_a CanTango::Finder::Permit::Base end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cantango-permits-0.1.1 | spec/cantango/permit/class_methods_spec.rb |