method
_prepare_run

v2_1_10 -
Show latest stable
-
0 notes -
Class: Runner
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
_prepare_run(suites, type)
public
Hide source
# File lib/test/unit.rb, line 682 def _prepare_run(suites, type) options[:job_status] ||= :replace if @tty && !@verbose case options[:color] when :always color = true when :auto, nil color = @options[:job_status] == :replace && /dumb/ !~ ENV["TERM"] else color = false end if color # dircolors-like style colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:]*)/)] : {} @passed_color = "\e[#{colors["pass"] || "32"}m" @failed_color = "\e[#{colors["fail"] || "31"}m" @skipped_color = "\e[#{colors["skip"] || "33"}m" @reset_color = "\e[m" else @passed_color = @failed_color = @skipped_color = @reset_color = "" end if color or @options[:job_status] == :replace @verbose = !options[:parallel] @output = StatusLineOutput.new(self) end if /\A\/(.*)\/\z/ =~ (filter = options[:filter]) filter = Regexp.new($1) end type = "#{type}_methods" total = if filter suites.inject(0) {|n, suite| n + suite.send(type).grep(filter).size} else suites.inject(0) {|n, suite| n + suite.send(type).size} end @test_count = 0 @total_tests = total.to_s(10) end