Sha256: fa500db25448c52a9f3cf66f605f75845cda7ea84407fe22967c52a40d31736d

Contents?: true

Size: 945 Bytes

Versions: 21

Compression:

Stored size: 945 Bytes

Contents

require 'spec_helper'

class AdminyPermit
end

class AdminyRolePermit
end


class MyAdminyPermit < CanTango::UserPermit
end
=begin
describe '#tango_permit macro' do
  specify do
    lambda { AdminPermit.tango_permit }.should raise_error
  end

  describe 'tango permit - hash only' do
    specify do
      lambda { AdminyRolePermit.tango_permit :type => :role }.should_not raise_error
    end
    subject { AdminyRolePermit.tango_permit :type => :role }

    specify { subject[:name].should == :adminy }
    specify { subject[:type].should == :role }
    specify { subject[:account].should == nil }
  end

  describe 'Inherit from tango permit' do
    specify do
      lambda { MyAdminyPermit.tango_permit }.should_not raise_error
    end
    subject { MyAdminyPermit.tango_permit }

    specify { subject[:name].should == :my }
    specify { subject[:type].should == :user_type }
    specify { subject[:account].should == nil }
  end
end

=end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/cantango/permits/macros_spec.rb
cantango-0.9.4.6 spec/cantango/permits/macros_spec.rb
cantango-0.9.4.5 spec/cantango/permits/macros_spec.rb
cantango-0.9.4.3 spec/cantango/permits/macros_spec.rb
cantango-0.9.4.2 spec/cantango/permits/macros_spec.rb
cantango-0.9.4.1 spec/cantango/permits/macros_spec.rb
cantango-0.9.4 spec/cantango/permits/macros_spec.rb
cantango-0.9.3.2 spec/cantango/permits/macros_spec.rb
cantango-0.8.9.5 spec/cantango/permits/macros_spec.rb
cantango-0.8.9.4 spec/cantango/permits/macros_spec.rb
cantango-0.8.9.3 spec/cantango/permits/macros_spec.rb
cantango-0.8.9.2 spec/cantango/permits/macros_spec.rb
cantango-0.8.9.1 spec/cantango/permits/macros_spec.rb
cantango-0.8.9 spec/cantango/permits/macros_spec.rb
cantango-0.8.8.1 spec/cantango/permits/macros_spec.rb
cantango-0.8.8 spec/cantango/permits/macros_spec.rb
cantango-0.8.7 spec/cantango/permits/macros_spec.rb
cantango-0.8.6.2 spec/cantango/permits/macros_spec.rb
cantango-0.8.6.1 spec/cantango/permits/macros_spec.rb
cantango-0.8.6 spec/cantango/permits/macros_spec.rb