How can I detect that test:unit integration tests are being run, so I can start/stop some background processes once for the duration of all the integration tests only, but not for unit / functional tests ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/u90vQMXlnwkJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tests are run as a separate process, not connected to other ones, by default So, using `ps aux | grep` i.e. for linux could help. Anyway, you need OS based solution here среда, 13 июня 2012 г., 14:57:08 UTC+3 пользователь sreid написал:> > How can I detect that test:unit integration tests are being run, so I can > start/stop some background processes once for the duration of all the > integration tests only, but not for unit / functional tests ? >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/r-Giaz_iwM0J. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jun 13, 12:57 pm, sreid <sreid0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How can I detect that test:unit integration tests are being run, so I can > start/stop some background processes once for the duration of all the > integration tests only, but not for unit / functional tests ?If you''re running the test via rake, you could probably add a rake task that starts whatever it is you are doing and add that task as a dependency of test:integration, so that rake will invoke it before test:integration runs Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.