# Backgroundrb and rails environment in running tests

**URL:** <https://www.ruby-forum.com/t/backgroundrb-and-rails-environment-in-running-tests/92144>\
**Category:** Rails\
**Created:** [April 16, 2007, 4:43pm UTC](https://www.ruby-forum.com/t/backgroundrb-and-rails-environment-in-running-tests/92144 "2007-04-16T16:43:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joergd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@joergd](https://www.ruby-forum.com/u/joergd)\
**Post date:** [April 16, 2007, 4:43pm UTC](https://www.ruby-forum.com/t/backgroundrb-and-rails-environment-in-running-tests/92144/1 "2007-04-16T16:43:41Z")

</div>

Hi,

If I start backgroundrb with rails\_env = production, and then run my  
test suite, is it true that my background tasks will run against the  
production database?

Can I prevent this from happening when I mistakenly end up with a  
combination like this?

Thanks  
Joerg
