How do you run rots in a Rails integration test? I can run rots from the command line, should I run the command from Ruby or is there a method I can call to get it to run?
A:
I think it's best to start rots in before(:all)
block (for rspec) or def setup
method (for test unit) and stop it in after(:all)
/def teardown
block/method respectively.
To start rots you probably should use something like:
rots = IO.popen("rots")
and then to stop it:
rots.close
but be aware this code is not tested.
Eimantas
2009-09-28 18:04:53
Do you mean `rots`? That seems to block until rots exit, so it never leaves the setup. What am I missing?
J. Pablo Fernández
2009-09-28 18:13:19
The backticks were removed from around rots in my comment.
J. Pablo Fernández
2009-09-28 18:21:45
Eimantas
2009-09-28 19:06:39