spec/troles/storage/string_many_spec.rb in troles-0.6.0 vs spec/troles/storage/string_many_spec.rb in troles-0.6.1
- old
+ new
@@ -8,12 +8,14 @@
User.troles_strategy :string_many
User.valid_roles = [:user, :admin, :blogger]
describe Troles::Storage::StringMany do
let(:kris) { Factory.create :user, :troles => 'user' }
- subject { Troles::Storage::StringMany.new kris }
+ subject { Troles::Storage::StringMany.new kris }
- it 'should set roles' do
- subject.set_roles 'blogger', 'admin'
- subject.display_roles.should == [:blogger, :admin]
+ it 'should set roles' do
+ subject.set_roles 'blogger', 'admin'
+ subject.display_roles.should == [:blogger, :admin]
+ puts kris.troles.inspect
+ kris.troles.split(',').should include('blogger', 'admin')
end
end