Skip to content

Commit

Permalink
Add comment about terminating newline in captions; fix test method name.
Browse files Browse the repository at this point in the history
  • Loading branch information
keithrbennett authored and jeremyevans committed Mar 3, 2021
1 parent 926c883 commit 02ce298
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/benchmark.rb
Expand Up @@ -128,6 +128,9 @@ module Benchmark
# benchmark tests. Reserves +label_width+ leading spaces for
# labels on each line. Prints +caption+ at the top of the
# report, and uses +format+ to format each line.
# (Note: +caption+ must contain a terminating newline character,
# see the default Benchmark::Tms::CAPTION for an example.)
#
# Returns an array of Benchmark::Tms objects.
#
# If the block returns an array of
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark/test_benchmark.rb
Expand Up @@ -71,7 +71,7 @@ def test_benchmark_does_not_print_any_space_if_the_given_caption_is_empty
BENCH
end

def test_benchmark_makes_extra_calcultations_with_an_Array_at_the_end_of_the_benchmark_and_show_the_result
def test_benchmark_makes_extra_calculations_with_an_Array_at_the_end_of_the_benchmark_and_show_the_result
assert_equal(BENCHMARK_OUTPUT_WITH_TOTAL_AVG,
capture_bench_output(:benchmark,
Benchmark::CAPTION, 7,
Expand Down

0 comments on commit 02ce298

Please sign in to comment.