On May 4, 2011, at 2:29 PM, Nathan Voxland wrote: > I have a JRuby Servlet environment very much like the "Parse Once, > Eval Many Times on Servlet" example at > http://kenai.com/projects/jruby/pages/RedBridgeServletExamples. > > What I am trying to do is execute an rspec test by hitting a URL > mapped to my JRuby servlet. I get an expected error the first time I > access the URL, but for each URL access after that I get the error > > IOError: closed stream
<snip/> > which appears to be because rspec does not expect me to be assigning a > new output to reporter on each execution. > > Is there a supported way to re-execute rspec multiple times without > restarting my webserver? No. > Or does rspec expect to only be called once? Yes. RSpec is designed to automate other things, but you are trying to automate it instead. There is an open feature request that would probably satisfy your use case: https://github.com/rspec/rspec-core/issues/359. Please feel free to add comments there. Cheers, David _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users