I have code that needs to be run only if the rails application is in the development environment (i.e. the $ rails server), but not in the test environment (i.e. $ rake test).
When i try
if Rails.env.development? dont run me during testing end
the code runs no matter what environment I am in. I even tried:
if Rails.env.development? and not Rails.env.test? NO, REALLY, DONT RUN ME DURING TESTING end
but no love.
What should I do instead?
Peter.
ruby-on-rails environment testing
spierepf Mar 18 '13 at 18:18 2013-03-18 18:18
source share