lib/test/unit/testcase.rb in test-unit-3.1.1 vs lib/test/unit/testcase.rb in test-unit-3.1.2
- old
+ new
@@ -400,10 +400,13 @@
return [] if path.nil?
target_locations = []
@@method_locations.each do |test_case, locations|
locations.each do |location|
- if location[:path].end_with?(path)
+ absolete_path = File.expand_path(path)
+ location_path = location[:path]
+ location_basename = File.basename(location_path)
+ if location_path == absolete_path or location_basename == path
target_locations << location.merge(:test_case => test_case)
end
end
end
target_locations