warn when trying to run Rails tests with RAILS_ENV=development

This commit is contained in:
Lee Bankewitz and Luke Melia 2010-06-07 11:26:42 -04:00
parent 6fbc582fe5
commit dbfd9275c1
1 changed files with 10 additions and 4 deletions

View File

@ -72,6 +72,12 @@ module Hydra #:nodoc:
yield self if block_given?
if Object.const_defined?('RAILS_ENV') && RAILS_ENV == 'development'
$stderr.puts <<-MSG
WARNING: RAILS_ENV is "development". Make sure to set it properly (ex: "RAILS_ENV=test rake hydra")
MSG
end
# Ensure we override rspec's at_exit
require 'hydra/spec/autorun_override'