# Unit-testing and sessions

**URL:** <https://www.ruby-forum.com/t/unit-testing-and-sessions/105475>\
**Category:** Ruby\
**Created:** [May 30, 2007, 10:59am UTC](https://www.ruby-forum.com/t/unit-testing-and-sessions/105475 "2007-05-30T10:59:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 30, 2007, 10:59am UTC](https://www.ruby-forum.com/t/unit-testing-and-sessions/105475/1 "2007-05-30T10:59:50Z")

</div>

So, I have started on a unit testing framework for the modules I’m  
using in a web app. That’s working, but what about testing the CGI  
scripts which use them? WebUnit seems to support doing this to  
scripts that have already been copied into the server… Is there  
a nice clean way to just run the scripts in a sandbox that looks  
to the script like a server called it? I’d rather do that before  
bothering the web server… Obviously, there’d also be a need for a  
“live” test on the server. But for now, I’d like to be able to fake  
things up and run scripts in a controlled environment. I suppose  
I could just roll my own running scripts with redirected input and  
output, but… Someone must have done this.

-s
