Hello all, >From what I've seen, this type of question doesn't really seem to get an answer on this list as most of the replies relate to failures of RSpec. If this is the case, where is the best place to go to get advice about best practices etc?
I have a question about best practice. In some of my controllers only an admin user can perform edit, update, show etc. So I have a before filter in those controllers; ApplicationController#authorise_is_admin The ApplicationController#authorise_is_admin throws an AccessDenied exception and that is caught in ApplicationController#access_denied My question is, in the spec for the calling controller, let's say ProductGroups, what should I spec? I have a context "user is admin" and that's easy to spec, but the context "user is not admin" is where I'm stuck as no actions are performed in that controller but I would just like to cover that failure somehow. Any advice? Thanks in advance. -ants
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users