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.5.0-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.5.0 test/exceptions_test.rb
ruby-prof-1.4.5-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.4.5 test/exceptions_test.rb
ruby-prof-1.4.4-x64-mingw-ucrt test/exceptions_test.rb
ruby-prof-1.4.4 test/exceptions_test.rb
ruby-prof-1.4.3-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.4.3 test/exceptions_test.rb
ruby-prof-1.4.2-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.4.2 test/exceptions_test.rb
ruby-prof-1.4.1-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.4.1 test/exceptions_test.rb
ruby-prof-1.4.0-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.4.0 test/exceptions_test.rb
ruby-prof-1.3.2 test/exceptions_test.rb
ruby-prof-1.3.1-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.3.1 test/exceptions_test.rb
ruby-prof-1.3.0-x64-mingw32 test/exceptions_test.rb
ruby-prof-1.3.0 test/exceptions_test.rb
ruby-prof-1.2.0 test/exceptions_test.rb