ffmike-test_benchmark 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/test_benchmark.rb +10 -4
  2. metadata +1 -1
@@ -4,9 +4,15 @@ require 'test/unit/testcase'
4
4
  require 'test/unit/ui/console/testrunner'
5
5
 
6
6
  class Test::Unit::UI::Console::TestRunner
7
- def self.set_test_benchmark_limits(set_display_limit=15, set_suite_display_limit=5)
8
- DISPLAY_LIMIT = set_display_limit
9
- SUITE_DISPLAY_LIMIT = set_suite_display_limit
7
+ DEFAULT_DISPLAY_LIMIT = 15
8
+ DEFAULT_SUITE_DISPLAY_LIMIT = 5
9
+
10
+ @@display_limit = DEFAULT_DISPLAY_LIMIT
11
+ @@suite_display_limit = DEFAULT_SUITE_DISPLAY_LIMIT
12
+
13
+ def self.set_test_benchmark_limits(set_display_limit=DEFAULT_DISPLAY_LIMIT, set_suite_display_limit=DEFAULT_SUITE_DISPLAY_LIMIT)
14
+ @@display_limit = set_display_limit
15
+ @@suite_display_limit = set_suite_display_limit
10
16
  end
11
17
 
12
18
  alias attach_to_mediator_old attach_to_mediator
@@ -82,7 +88,7 @@ private
82
88
  return if benchmarks.nil? || benchmarks.empty?
83
89
  benchmarks = benchmarks.sort(&@@sort_by_time)
84
90
  unless full_output?
85
- cutoff = (suite_name == :suite) ? SUITE_DISPLAY_LIMIT : DISPLAY_LIMIT
91
+ cutoff = (suite_name == :suite) ? @@suite_display_limit : @@display_limit
86
92
  benchmarks = benchmarks.slice(0, cutoff)
87
93
  end
88
94
  benchmarks.map(&@@format_benchmark_row)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffmike-test_benchmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Connor