Browse files

Use require instead of load in testtask and runtest to avoid duplicat…

…e loading
  • Loading branch information...
drbrain committed Feb 14, 2011
1 parent ae93ad2 commit 15c309a43bdbae9d4164400d854ec3e4fd206ab1
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/rake/runtest.rb
  2. +1 −1 lib/rake/testtask.rb
@@ -8,7 +8,7 @@ def run_tests(pattern='test/test*.rb', log_enabled=false)
Dir["#{pattern}"].each { |fn|
$stderr.puts fn if log_enabled
load fn
require fn
rescue Exception => ex
$stderr.puts "Error in #{fn}: #{ex.message}"
$stderr.puts ex.backtrace
@@ -148,7 +148,7 @@ def ruby_version
def run_code
case @loader
when :direct
"-e \"ARGV.each{|f| load f}\""
"-e \"ARGV.each{|f| require f}\""
when :testrb
"-S testrb #{fix}"
when :rake

0 comments on commit 15c309a

Please sign in to comment.