Module: Assert::ConfigHelpers
Instance Method Summary collapse
- #all_pass? ⇒ Boolean
- #count(type) ⇒ Object
- #formatted_result_rate(format = '%.6f') ⇒ Object
- #formatted_run_time(format = '%.6f') ⇒ Object
- #formatted_test_rate(format = '%.6f') ⇒ Object
-
#ocurring_result_types ⇒ Object
return a list of result symbols that have actually occurred.
- #runner ⇒ Object
- #runner_seed ⇒ Object
- #show_test_profile_info? ⇒ Boolean
- #show_test_verbose_info? ⇒ Boolean
- #single_test? ⇒ Boolean
- #single_test_file_line ⇒ Object
- #suite ⇒ Object
- #tests? ⇒ Boolean
- #view ⇒ Object
Instance Method Details
#all_pass? ⇒ Boolean
29 30 31 |
# File 'lib/assert/config_helpers.rb', line 29 def all_pass? self.count(:pass) == self.count(:results) end |
#count(type) ⇒ Object
21 22 23 |
# File 'lib/assert/config_helpers.rb', line 21 def count(type) self.config.suite.count(type) end |
#formatted_result_rate(format = '%.6f') ⇒ Object
41 42 43 |
# File 'lib/assert/config_helpers.rb', line 41 def formatted_result_rate(format = '%.6f') format % self.config.suite.result_rate end |
#formatted_run_time(format = '%.6f') ⇒ Object
33 34 35 |
# File 'lib/assert/config_helpers.rb', line 33 def formatted_run_time(format = '%.6f') format % self.config.suite.run_time end |
#formatted_test_rate(format = '%.6f') ⇒ Object
37 38 39 |
# File 'lib/assert/config_helpers.rb', line 37 def formatted_test_rate(format = '%.6f') format % self.config.suite.test_rate end |
#ocurring_result_types ⇒ Object
return a list of result symbols that have actually occurred
54 55 56 57 58 |
# File 'lib/assert/config_helpers.rb', line 54 def ocurring_result_types @result_types ||= [:pass, :fail, :ignore, :skip, :error].select do |sym| self.count(sym) > 0 end end |
#runner ⇒ Object
5 |
# File 'lib/assert/config_helpers.rb', line 5 def runner; self.config.runner; end |
#runner_seed ⇒ Object
9 10 11 |
# File 'lib/assert/config_helpers.rb', line 9 def runner_seed self.config.runner_seed end |
#show_test_profile_info? ⇒ Boolean
45 46 47 |
# File 'lib/assert/config_helpers.rb', line 45 def show_test_profile_info? !!self.config.profile end |
#show_test_verbose_info? ⇒ Boolean
49 50 51 |
# File 'lib/assert/config_helpers.rb', line 49 def show_test_verbose_info? !!self.config.verbose end |
#single_test? ⇒ Boolean
13 14 15 |
# File 'lib/assert/config_helpers.rb', line 13 def single_test? self.config.single_test? end |
#single_test_file_line ⇒ Object
17 18 19 |
# File 'lib/assert/config_helpers.rb', line 17 def single_test_file_line self.config.single_test_file_line end |
#suite ⇒ Object
6 |
# File 'lib/assert/config_helpers.rb', line 6 def suite; self.config.suite; end |
#tests? ⇒ Boolean
25 26 27 |
# File 'lib/assert/config_helpers.rb', line 25 def tests? self.count(:tests) > 0 end |
#view ⇒ Object
7 |
# File 'lib/assert/config_helpers.rb', line 7 def view; self.config.view; end |