1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

fixed for Ruby 1.9.3

This commit is contained in:
ser1zw 2011-11-03 22:25:45 +09:00
parent cd3cd06829
commit 60104c6f47
2 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ OpenCV wrapper for Ruby
== FEATURES/PROBLEMS: == FEATURES/PROBLEMS:
* Some OpenCV functions are wrapped. * Some OpenCV functions are wrapped.
* Ruby 1.8.7, 1.9.2 and OpenCV 2.3 are supported. * Ruby 1.8.7, 1.9.3 and OpenCV 2.3 are supported.
== DEPENDENCIES: == DEPENDENCIES:

View file

@ -2,8 +2,8 @@
# -*- mode: ruby; coding: utf-8-unix -*- # -*- mode: ruby; coding: utf-8-unix -*-
require 'test/unit' require 'test/unit'
if Test::Unit.methods.include? :setup_argv
src_testdir = File.dirname(File.expand_path(__FILE__)) src_testdir = File.dirname(File.expand_path(__FILE__))
if Test::Unit.methods.include? :setup_argv
srcdir = File.dirname(src_testdir) srcdir = File.dirname(src_testdir)
Test::Unit.setup_argv {|files| Test::Unit.setup_argv {|files|
if files.empty? if files.empty?
@ -22,9 +22,9 @@ if Test::Unit.methods.include? :setup_argv
} }
end end
} }
elsif Test::Unit.constants.include? 'AutoRunner' elsif Test::Unit.constants.map {|c| c.to_sym }.include? :AutoRunner
Test::Unit::AutoRunner.run(true, './') Test::Unit::AutoRunner.run(true, src_testdir)
else else
raise Error, 'Test runner not found' raise 'Test runner not found'
end end