Sha256: 8d5cc07cba6191d9850dd568cfb91ef0105c22e48f69676f18096bd741c4f404
Contents?: true
Size: 588 Bytes
Versions: 2
Compression:
Stored size: 588 Bytes
Contents
require 'strategy_helper' User.troles_strategy :string_one do |c| c.valid_roles = [:user, :admin, :editor, :blogger] end.configure! module UserSetup def create_no_roles Factory.create :user, :name => 'no roles', :trole => '' end def create_user Factory.create :user, :name => 'user', :trole => 'user' end def create_admin_user Factory.create :user, :name => 'admin', :trole => 'admin' end end describe 'Trole strategy string_one' do it_behaves_like "Common API" it_behaves_like "Common API for multiple roles" it_behaves_like "Trole API" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
troles-0.5.1 | spec/trole/strategies/string_one_spec.rb |
troles-0.5.0 | spec/trole/strategies/string_one_spec.rb |