[rspec-users] RSpec-rails 1.2.2: autospec passes but "rake spec" fails

Bart Zonneveld zuperinfinite at gmail.com
Sat Mar 28 16:49:09 EDT 2009

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

> On Fri, Mar 27, 2009 at 8:36 AM, David Chelimsky  
> <dchelimsky at 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,

More information about the rspec-users mailing list