Module: Assert::ConfigHelpers

Included in:
Runner, Suite, View
Defined in:
lib/assert/config_helpers.rb

Instance Method Summary collapse

Instance Method Details

#all_pass?Boolean

Returns:

  • (Boolean)

65
66
67
# File 'lib/assert/config_helpers.rb', line 65

def all_pass?
  pass_result_count == result_count
end

#error_result_countObject


53
54
55
# File 'lib/assert/config_helpers.rb', line 53

def error_result_count
  config.suite.error_result_count
end

#fail_result_countObject


49
50
51
# File 'lib/assert/config_helpers.rb', line 49

def fail_result_count
  config.suite.fail_result_count
end

#formatted_result_rate(result_rate, format = "%.6f") ⇒ Object


77
78
79
# File 'lib/assert/config_helpers.rb', line 77

def formatted_result_rate(result_rate, format = "%.6f")
  format % result_rate
end

#formatted_run_time(run_time, format = "%.6f") ⇒ Object


69
70
71
# File 'lib/assert/config_helpers.rb', line 69

def formatted_run_time(run_time, format = "%.6f")
  format % run_time
end

#formatted_suite_result_rate(format = "%.6f") ⇒ Object


89
90
91
# File 'lib/assert/config_helpers.rb', line 89

def formatted_suite_result_rate(format = "%.6f")
  formatted_result_rate(config.suite.result_rate, format)
end

#formatted_suite_run_time(format = "%.6f") ⇒ Object


81
82
83
# File 'lib/assert/config_helpers.rb', line 81

def formatted_suite_run_time(format = "%.6f")
  formatted_run_time(config.suite.run_time, format)
end

#formatted_suite_test_rate(format = "%.6f") ⇒ Object


85
86
87
# File 'lib/assert/config_helpers.rb', line 85

def formatted_suite_test_rate(format = "%.6f")
  formatted_test_rate(config.suite.test_rate, format)
end

#formatted_test_rate(test_rate, format = "%.6f") ⇒ Object


73
74
75
# File 'lib/assert/config_helpers.rb', line 73

def formatted_test_rate(test_rate, format = "%.6f")
  format % test_rate
end

#ignore_result_countObject


61
62
63
# File 'lib/assert/config_helpers.rb', line 61

def ignore_result_count
  config.suite.ignore_result_count
end

#ocurring_result_typesObject

return a list of result type symbols that have actually occurred


102
103
104
105
106
107
# File 'lib/assert/config_helpers.rb', line 102

def ocurring_result_types
  @result_types ||=
    [:pass, :fail, :ignore, :skip, :error].select do |sym|
      send("#{sym}_result_count") > 0
    end
end

#pass_result_countObject


45
46
47
# File 'lib/assert/config_helpers.rb', line 45

def pass_result_count
  config.suite.pass_result_count
end

#result_countObject


41
42
43
# File 'lib/assert/config_helpers.rb', line 41

def result_count
  config.suite.result_count
end

#runnerObject


5
6
7
# File 'lib/assert/config_helpers.rb', line 5

def runner
  config.runner
end

#runner_seedObject


17
18
19
# File 'lib/assert/config_helpers.rb', line 17

def runner_seed
  config.runner_seed
end

#show_test_profile_info?Boolean

Returns:

  • (Boolean)

93
94
95
# File 'lib/assert/config_helpers.rb', line 93

def show_test_profile_info?
  !!config.profile
end

#show_test_verbose_info?Boolean

Returns:

  • (Boolean)

97
98
99
# File 'lib/assert/config_helpers.rb', line 97

def show_test_verbose_info?
  !!config.verbose
end

#single_test?Boolean

Returns:

  • (Boolean)

21
22
23
# File 'lib/assert/config_helpers.rb', line 21

def single_test?
  config.single_test?
end

#single_test_file_lineObject


25
26
27
# File 'lib/assert/config_helpers.rb', line 25

def single_test_file_line
  config.single_test_file_line
end

#skip_result_countObject


57
58
59
# File 'lib/assert/config_helpers.rb', line 57

def skip_result_count
  config.suite.skip_result_count
end

#suiteObject


9
10
11
# File 'lib/assert/config_helpers.rb', line 9

def suite
  config.suite
end

#test_countObject


37
38
39
# File 'lib/assert/config_helpers.rb', line 37

def test_count
  config.suite.test_count
end

#tests_to_run?Boolean

Returns:

  • (Boolean)

29
30
31
# File 'lib/assert/config_helpers.rb', line 29

def tests_to_run?
  config.suite.tests_to_run?
end

#tests_to_run_countObject


33
34
35
# File 'lib/assert/config_helpers.rb', line 33

def tests_to_run_count
  config.suite.tests_to_run_count
end

#viewObject


13
14
15
# File 'lib/assert/config_helpers.rb', line 13

def view
  config.view
end