Permalink
Browse files

Better with #abort

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent f36a380 commit 70b849546871610513bf587ecb7aebcaa8e20773 @jcxplorer jcxplorer committed with josevalim Feb 28, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 railties/lib/rails/test_help.rb
@@ -1,9 +1,6 @@
# Make double-sure the RAILS_ENV is set to test,
# so fixtures are loaded to the right database
-unless Rails.env.test?
- puts "Abort testing: Your Rails environment is not running in test mode!"
- exit
-end
+abort("Abort testing: Your Rails environment is not running in test mode!") unless Rails.env.test?
require 'test/unit'
require 'active_support/core_ext/kernel/requires'

0 comments on commit 70b8495

Please sign in to comment.