In your spec/spec_helper.rb file you should see a line at the to which says RAILS_ENV="test". If you haven't modified your spec_helper.rb file I would remove it and re-run "script/generate rspec". It should be there. I just generated a new Rails project with rspec and rspec-rails gems. Here's the top of my spec/spec_helper.rb:
# This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'spec' require 'spec/rails' Zach On Wed, Oct 8, 2008 at 3:15 PM, Wes Gamble <[EMAIL PROTECTED]> wrote: > With Rails, is "rake spec" supposed to automatically run under the test > environment? I have to do "rake spec RAILS_ENV=test" in order to get the > environments/test.rb file to load. > > Also, are the standard Test::Unit fixtures automatically loaded before each > test in each spec file? This appears to be the case based on my current > spec's behavior, but wanted to verify. > > Thanks, > Wes > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
