test/stack_printer_test.rb in ruby-prof-0.13.0 vs test/stack_printer_test.rb in ruby-prof-0.13.1

- old
+ new

@@ -41,12 +41,14 @@ expected_time = end_time - start_time file_contents = nil assert_nothing_raised { file_contents = print(result) } # TODO: why are thread ids negative on travis-ci.org (32 bit build maybe?) - assert_match(/Thread: (-?\d+)(, Fiber: (-?\d+))? \(100\.00% ~ ([\.0-9]+)\)/, file_contents) + re = /Thread: (-?\d+)(, Fiber: (-?\d+))? \(100\.00% ~ ([\.0-9]+)\)/ + assert_match(re, file_contents) + file_contents =~ re actual_time = $4.to_f - assert_in_delta(expected_time, actual_time, 0.5) + assert_in_delta(expected_time, actual_time, 0.1) end def test_method_elimination RubyProf.start 5.times{STPT.new.a}