# Test - Skip Setup

**URL:** <https://www.ruby-forum.com/t/test-skip-setup/192292>\
**Category:** Rails\
**Created:** [July 27, 2010, 9:01pm UTC](https://www.ruby-forum.com/t/test-skip-setup/192292 "2010-07-27T21:01:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric2323223](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7c8e57/32.png) [@eric2323223](https://www.ruby-forum.com/u/eric2323223)\
**Post date:** [July 27, 2010, 9:01pm UTC](https://www.ruby-forum.com/t/test-skip-setup/192292/1 "2010-07-27T21:01:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![eric2323223](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7c8e57/32.png) [@eric2323223](https://www.ruby-forum.com/u/eric2323223)\
**Post date:** [July 27, 2010, 11:10pm UTC](https://www.ruby-forum.com/t/test-skip-setup/192292/2 "2010-07-27T23:10:59Z")

</div>

On Jul 27, 7:59 pm, Eric Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> want to skip the setup call.

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

---

<div class="post-metadata">

**Author:** ![eric2323223](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7c8e57/32.png) [@eric2323223](https://www.ruby-forum.com/u/eric2323223)\
**Post date:** [July 28, 2010, 12:45am UTC](https://www.ruby-forum.com/t/test-skip-setup/192292/3 "2010-07-28T00:45:50Z")

</div>

Quoting Eric Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> want to skip the setup call.

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.

Jeffrey
