░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/vendor/bundle/ruby/3.1.0/gems/stackprof-0.2.24/test
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: test_report.rb
$:.unshift File.expand_path('../../lib', __FILE__) require 'stackprof' require 'minitest/autorun' class ReportDumpTest < MiniTest::Test require 'stringio' def test_dump_to_stdout data = {} report = StackProf::Report.new(data) out, _err = capture_subprocess_io do report.print_dump end assert_dump data, out end def test_dump_to_file data = {} f = StringIO.new report = StackProf::Report.new(data) report.print_dump(f) assert_dump data, f.string end private def assert_dump(expected, marshal_data) assert_equal expected, Marshal.load(marshal_data) end end class ReportReadTest < MiniTest::Test require 'pathname' def test_from_file_read_json file = fixture("profile.json") report = StackProf::Report.from_file(file) assert_equal({ mode: "cpu" }, report.data) end def test_from_file_read_marshal file = fixture("profile.dump") report = StackProf::Report.from_file(file) assert_equal({ mode: "cpu" }, report.data) end private def fixture(name) Pathname.new(__dir__).join("fixtures", name) end end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📁 fixtures/
DIR
—
2023-09-24 03:47
📄 test_middleware.rb
RB
2 KB
2023-09-24 03:47
EDIT
📄 test_report.rb
RB
1.1 KB
2023-09-24 03:47
EDIT
📄 test_stackprof.rb
RB
8.1 KB
2023-09-24 03:47
EDIT
📄 test_truffleruby.rb
RB
444 B
2023-09-24 03:47
EDIT