Sha256: 0810fe35747935e799f71df842501f3c5ee226bb32167f7cf138bba962abe1f2

Contents?: true

Size: 550 Bytes

Versions: 12

Compression:

Stored size: 550 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.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.profile(:allow_exceptions => true) do
        raise(RuntimeError, 'Test error')
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
ruby-prof-1.7.1-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.7.1 test/exceptions_test.rb
ruby-prof-1.7.0-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.7.0 test/exceptions_test.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/ruby-prof-1.6.3/test/exceptions_test.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/ruby-prof-1.6.3/test/exceptions_test.rb
ruby-prof-1.6.3-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.6.3 test/exceptions_test.rb
ruby-prof-1.6.2-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.6.2 test/exceptions_test.rb
ruby-prof-1.6.1 test/exceptions_test.rb
ruby-prof-1.6.1-x64-mingw-ucrt test/exceptions_test.rb