Sha256: 3d32a39db86ea1187200ad2abc8f092d51fb20408f10bf2c8a6e4fa7d48112e1
Contents?: true
Size: 719 Bytes
Versions: 12
Compression:
Stored size: 719 Bytes
Contents
#!/usr/bin/env ruby # encoding: UTF-8 require File.expand_path('../test_helper', __FILE__) require 'stringio' require 'fileutils' require 'tmpdir' require_relative 'prime' # -- Tests ---- class PrinterCallStackTest < TestCase def setup # WALL_TIME so we can use sleep in our test and get same measurements on linux and windows RubyProf::measure_mode = RubyProf::WALL_TIME @result = RubyProf.profile do run_primes(1000, 5000) end end def test_graph_html_string output = '' printer = RubyProf::CallStackPrinter.new(@result) printer.print(output) assert_match(/<!DOCTYPE html>/i, output) assert_match(/Object#run_primes/i, output) end end
Version data entries
12 entries across 12 versions & 1 rubygems