Sha256: 812f177ab824c6d0ea50dbe2d1f470041a24df256222ce0ada834dd16fafb97d

Contents?: true

Size: 318 Bytes

Versions: 15

Compression:

Stored size: 318 Bytes

Contents

def basic_config context
  send :"#{context}_config"
end

def guest_config
  @guest    = User.new(1, :guest)
  @ability  = Permits::Ability.new @guest 
  @comment  = Comment.new(1)
  @post     = Post.new(1)
end

def admin_config
  @admin = User.new(1, :admin, 'kristian')
  @ability = Permits::Ability.new(@admin)
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cancan-permits-0.3.12 spec/generic/api/basic/config.rb
cancan-permits-0.3.11 spec/generic/api/basic/config.rb
cancan-permits-0.3.10 spec/generic/api/basic/config.rb
cancan-permits-0.3.9 spec/generic/api/basic/config.rb
cancan-permits-0.3.8 spec/generic/api/basic/config.rb
cancan-permits-0.3.7 spec/generic/api/basic/config.rb
cancan-permits-0.3.6 spec/generic/api/basic/config.rb
cancan-permits-0.3.5 spec/generic/api/basic/config.rb
cancan-permits-0.3.4 spec/generic/api/basic/config.rb
cancan-permits-0.3.2 spec/generic/api/basic/config.rb
cancan-permits-0.3.1 spec/generic/api/basic/config.rb
cancan-permits-0.3.0 spec/generic/api/basic/config.rb
cancan-permits-0.2.9 spec/generic/api/basic/config.rb
cancan-permits-0.2.8 spec/generic/api/basic/config.rb
cancan-permits-0.2.7 spec/generic/api/basic/config.rb