Sha256: d3cbca58240a98450372b411ea8558eb8ee633551ab2ee49cc669310a81f2cd9

Contents?: true

Size: 900 Bytes

Versions: 12

Compression:

Stored size: 900 Bytes

Contents

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

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

class CompatibilityTest < TestCase
  def setup
    super
    Gem::Deprecate.skip = true
    RubyProf::measure_mode = RubyProf::WALL_TIME
  end

  def teardown
    super
    Gem::Deprecate.skip = false
  end

  def test_running
    assert(!RubyProf.running?)
    RubyProf.start
    assert(RubyProf.running?)
    RubyProf.stop
    assert(!RubyProf.running?)
  end

  def test_double_profile
    RubyProf.start
    assert_raises(RuntimeError) do
      RubyProf.start
    end
    RubyProf.stop
  end

  def test_no_block
    assert_raises(ArgumentError) do
      RubyProf.profile
    end
  end

  def test_traceback
    RubyProf.start
    assert_raises(NoMethodError) do
      RubyProf.xxx
    end

    RubyProf.stop
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

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