[rspec-users] Rake spec failure in beta.13
dchelimsky at gmail.com
Sat Jun 26 10:24:41 EDT 2010
On Jun 25, 2010, at 4:51 PM, geetarista wrote:
> Sorry about that. For some reason I thought Google Reader stripped
> that automatically.
> I added ":require => nil" because I had read somewhere that it was
> good to do so. Can't remember why or where. Taking it out does not
> fix the failure.
> I just haven't upgraded Haml because it's not top priority and I
> haven't run into any issues yet.
I figured out the problem. It boils down to these two lines in spec/spec_helper.rb
ENV["RAILS_ENV"] ||= 'test'
require File.dirname(__FILE__) + "/../config/environment" unless defined?(Rails)
I'm changing those to this for the next release:
ENV['RAILS_ENV'] = ENV['RSPEC_RAILS_ENV'] || 'test'
require File.expand_path("../../config/environment", __FILE__)
Do that in your spec_helper now and it should work correctly. Please confirm.
More information about the rspec-users