File: exceptions_test.rb

package info (click to toggle)
ruby-prof 0.7.3-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 468 kB
  • sloc: ruby: 2,377; ansic: 1,431; makefile: 31
file content (15 lines) | stat: -rwxr-xr-x 287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env ruby
require 'test/unit'
require 'ruby-prof'

class ExceptionsTest < Test::Unit::TestCase
  def test_profile
    result = begin
      RubyProf.profile do 
        raise(RuntimeError, 'Test error')
      end
    rescue => e
    end    
    assert_not_nil(result)
  end
end