Debian Codegraph @

rake.d/vendor/drake-0.9.2.0.3.1/lib/rake/ruby182_test_unit_fix.rb

raw
1 # Local Rake override to fix bug in Ruby 0.8.2
2 module Test # :nodoc:
3 # Local Rake override to fix bug in Ruby 0.8.2
4 module Unit # :nodoc:
5 # Local Rake override to fix bug in Ruby 0.8.2
6 module Collector # :nodoc:
7 # Local Rake override to fix bug in Ruby 0.8.2
8 class Dir # :nodoc:
9 undef collect_file
10 def collect_file(name, suites, already_gathered) # :nodoc:
11 dir = File.dirname(File.expand_path(name))
12 $:.unshift(dir) unless $:.first == dir
13 if(@req)
14 @req.require(name)
15 else
16 require(name)
17 end
18 find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
19 ensure
20 $:.delete_at $:.rindex(dir)
21 end
22 end
23 end
24 end
25 end