summaryrefslogtreecommitdiff
path: root/lib/rake/ruby182_test_unit_fix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rake/ruby182_test_unit_fix.rb')
-rw-r--r--lib/rake/ruby182_test_unit_fix.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rake/ruby182_test_unit_fix.rb b/lib/rake/ruby182_test_unit_fix.rb
index 9e411ed..e47feeb 100644
--- a/lib/rake/ruby182_test_unit_fix.rb
+++ b/lib/rake/ruby182_test_unit_fix.rb
@@ -10,12 +10,14 @@ module Test # :nodoc:
def collect_file(name, suites, already_gathered) # :nodoc:
dir = File.dirname(File.expand_path(name))
$:.unshift(dir) unless $:.first == dir
- if(@req)
+ if @req
@req.require(name)
else
require(name)
end
- find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
+ find_test_cases(already_gathered).each do |t|
+ add_suite(suites, t.suite)
+ end
ensure
$:.delete_at $:.rindex(dir)
end