Figured out my own answer here.  Solution was to add

fixtures :users

at the top of the controller spec, and then

login_as :username

in the before(:each) block of each description

..... duh .....

On Oct 1, 11:10 am, Neal L <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm starting to use the restful_authenticaiton plugin in a project,
> and am using Rspec to write tests.  The problem I'm having is that
> most of the app has requires that the user be logged in -- i.e.,:
>
> before_filter :login_required
>
> The problem I'm running into with my Rspec tests is that I can't quite
> figure out how to get the user logged in.  I've read a few blog posts
> on this, but I can't get my hands on some working test code.  Has
> anyone out there run into this?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to