using new Rails.env

This commit is contained in:
Nick Gauthier 2010-09-07 14:24:14 -04:00
parent 3fd1401513
commit 5f4bf365ba
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ module Hydra #:nodoc:
def define
desc "Hydra Tests" + (@name == :hydra ? "" : " for #{@name}")
task @name do
if Object.const_defined?('RAILS_ENV') && RAILS_ENV == 'development'
$stderr.puts %{WARNING: RAILS_ENV is "development". Make sure to set it properly (ex: "RAILS_ENV=test rake hydra")}
if Object.const_defined?('Rails') && Rails.env == 'development'
$stderr.puts %{WARNING: Rails Environment is "development". Make sure to set it properly (ex: "RAILS_ENV=test rake hydra")}
end
Hydra::Master.new(@opts)