Re: [rspec-users] Testing Views with Authentication

2008-10-08 Thread Pat Maddox
Donald French <[EMAIL PROTECTED]> writes: > I am trying to figure out how to properly test a view when part of the > view is is protected with a role check <% if current_user.admin? %>.. > How do I force a log in or mock the current user. I need to do it in a > DRY way as this is used throughout t

Re: [rspec-users] Testing Views with Authentication

2008-10-08 Thread David Chelimsky
On Wed, Oct 8, 2008 at 6:31 PM, Donald French <[EMAIL PROTECTED]> wrote: > I am trying to figure out how to properly test a view when part of the view > is is protected with a role check <% if current_user.admin? %>.. How do I > force a log in or mock the current user. I need to do it in a DRY way

[rspec-users] Testing Views with Authentication

2008-10-08 Thread Donald French
I am trying to figure out how to properly test a view when part of the view is is protected with a role check <% if current_user.admin? %>.. How do I force a log in or mock the current user. I need to do it in a DRY way as this is used throughout the system checking various privileges. D