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@googlegroups.com.
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.

Search Discussions

  • Max Reznichenko at Jun 13, 2012 at 12:08 pm
    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@googlegroups.com.
    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.
  • Frederick Cheung at Jun 13, 2012 at 12:13 pm

    On Jun 13, 12:57 pm, sreid 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@googlegroups.com.
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 13, '12 at 11:57a
activeJun 13, '12 at 12:13p
posts3
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase