On 27 mrt 2009, at 21:03, Stephen Eley wrote:

On Fri, Mar 27, 2009 at 8:36 AM, David Chelimsky <dchelim...@gmail.com> wrote:

You can also change spec_helper.rb to force the test environment with:
 ENV["RAILS_ENV"] = 'test'
That's what it used to do but somebody complained that it shouldn't
force an environment :)

99% of Rails users are going to want to
run their Rspec behaviors in 'test' every time.  Setting the
environment to 'test' is therefore sensible.

I very strongly disagree on this one. As it so happens, we've found a bug in Passenger regarding uploads, umasks and permissions, which was caused by Passenger overwriting the TMP_DIR environment variable. Took us quite a while to figure this one out.

Even more, rake RAILS_ENV=development spec wouldn't work as expected when the env gets explicitly set from within a spec helper.

my 2cts,
bartz

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to