spec/roles_spec.rb in permissive-0.2.5.alpha vs spec/roles_spec.rb in permissive-0.2.6.alpha

- old
+ new

@@ -80,7 +80,15 @@ it "should return `true` from 'is_role?' when a user has the correct role" do user = UserWithRole.create!(:role => 'hungry_person') user.is_hungry_person?.should be_true user.is_sleepy_person?.should be_false end + + it "should allow setting the role to 'nil'" do + user = UserWithRole.create!(:role => 'hungry_person') + user.can_eat?.should be_true + user.update_attributes(:role => nil) + user.can_eat?.should be_false + end + end end \ No newline at end of file