You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Hi,
I want to write a functional test using the default test unit that is
included with rails 3.
Is there a way to skip a setup call?
So I'm trying to test the users controller.
But to access those actions, I need to be logged in. So I put a login
algorithm in my setup.
But I do not need to be logged in to create a new user. This is why I
want to skip the setup call.
Eric
Frederick Cheung
unread,
Jul 27, 2010, 5:09:54 PM7/27/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Either split those tests out into a different test class or look at
something like shoulda for more flexibility around the contexts tests
run in.
Fred
Jeffrey L. Taylor
unread,
Jul 27, 2010, 6:44:22 PM7/27/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Logout as the first step in the test, then try to create a new user. Or create another test file with no setup just for the test.