Sha256: 1e82d88088f2b48583f6621403f38976c1cb4bff7dcedde2b13e66a50c6970c3

Contents?: true

Size: 532 Bytes

Versions: 26

Compression:

Stored size: 532 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

require File.expand_path('../test_helper', __FILE__)

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

  def test_profile_allows_exceptions
    assert_raises(RuntimeError) do
      RubyProf.profile(:allow_exceptions => true) do
        raise(RuntimeError, 'Test error')
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
ruby-prof-1.1.0-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.1.0 test/exceptions_test.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/ruby-prof-0.18.0/test/exceptions_test.rb
ruby-prof-1.0.0 test/exceptions_test.rb
ruby-prof-0.18.0-x64-mingw32 test/exceptions_test.rb
ruby-prof-0.18.0 test/exceptions_test.rb