test/base/catchpoint.rb in ruby-debug-0.10.4 vs test/base/catchpoint.rb in ruby-debug-0.10.5.rc1
- old
+ new
@@ -1,26 +1,19 @@
#!/usr/bin/env ruby
-require 'test/unit'
+require File.expand_path("../../helper", __FILE__)
# Test catchpoint in C ruby_debug extension.
class TestRubyDebugCatchpoint < Test::Unit::TestCase
-
- $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
- require 'ruby_debug'
- $:.shift
-
- # test current_context
def test_catchpoints
assert_raise(RuntimeError) {Debugger.catchpoints}
Debugger.start_
assert_equal({}, Debugger.catchpoints)
Debugger.add_catchpoint('ZeroDivisionError')
assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
Debugger.add_catchpoint('RuntimeError')
assert_equal(['RuntimeError', 'ZeroDivisionError'],
Debugger.catchpoints.keys.sort)
+ ensure
Debugger.stop
end
-
end
-