Class: TestsBuilder
Overview
Construction de la tache test (test unitaires du code ruby)
author: Vincent Dubois
date: 11 fevrier 2009
Instance Method Summary collapse
-
#build(project_name, auto_install, proxy_option) ⇒ Object
Implementation de la construction de la tache.
-
#prerequisite_met? ⇒ Boolean
Prérequis à la tâche.
-
#prerequisite_unmet_message ⇒ Object
Dans le cas de l’erreur de prérequis.
Methods included from Utils
build_name, erb_run, flog_caracteristics, flog_score_to_css_style, percent_to_css_style, run_command, verify_gem_presence
Instance Method Details
#build(project_name, auto_install, proxy_option) ⇒ Object
Implementation de la construction de la tache
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/tests_builder.rb', line 20 def build(project_name, auto_install, proxy_option) # On lance la generation puts " Building tests report..." if File.exist?("#{Continuous4r::WORK_DIR}/tests-run.html") File.delete("#{Continuous4r::WORK_DIR}/tests-run.html") end tests_report = File.open("#{Continuous4r::WORK_DIR}/tests-run.html", "w") html = TestsFormatter.new.to_html tests_report.write(html) tests_report.close end |
#prerequisite_met? ⇒ Boolean
Prérequis à la tâche
10 11 12 |
# File 'lib/tests_builder.rb', line 10 def prerequisite_met? Dir.glob("test/**/*.rb").length > 0 end |
#prerequisite_unmet_message ⇒ Object
Dans le cas de l’erreur de prérequis
15 16 17 |
# File 'lib/tests_builder.rb', line 15 def " No tests found. The 'tests' task will be empty." end |