Permalink
Browse files

#exit accepts an integer, not a string

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

2 comments on commit 020fdb2

Member

josh replied Feb 28, 2010

use "abort". It writes the message to stderr and exits.

Contributor

jcxplorer replied Feb 28, 2010

You're right! I added a new patch to the Lighthouse ticket.

Please sign in to comment.