Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only abort in test_help in production env

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 672ce11d684e1211836ca22cf5b0ca6f626f1719 1 parent 7223fe7
@dchelimsky dchelimsky authored josevalim committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails/test_help.rb
View
6 railties/lib/rails/test_help.rb
@@ -1,6 +1,6 @@
-# Make double-sure the RAILS_ENV is set to test,
-# so fixtures are loaded to the right database
-abort("Abort testing: Your Rails environment is not running in test mode!") unless Rails.env.test?
+# Make double-sure the RAILS_ENV is not set to production,
+# so fixtures aren't loaded into that environment
+abort("Abort testing: Your Rails environment is not running in test mode!") if Rails.env.production?

Message should now actually be "Abort testing: Your Rails environment is running in production mode!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
require 'test/unit'
require 'active_support/core_ext/kernel/requires'
@tilsammans

Message should now actually be "Abort testing: Your Rails environment is running in production mode!"

Please sign in to comment.
Something went wrong with that request. Please try again.