test/stack_printer_test.rb in ruby-prof-0.10.6 vs test/stack_printer_test.rb in ruby-prof-0.10.7
- old
+ new
@@ -44,10 +44,10 @@
file_contents = nil
assert_nothing_raised { file_contents = print(result) }
assert file_contents =~ /Thread: (\d+) \(100\.00% ~ ([.0-9]+)\)/
actual_time = $2.to_f
difference = (expected_time-actual_time).abs
- assert difference < 0.01 # less than 1 ms
+ assert_in_delta(expected_time, actual_time, 0.01)
end
def test_method_elimination
RubyProf.start
5.times{STPT.new.a}