Class: ZentestBuilder

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/zentest_builder.rb

Overview

Construction de la tache zentest (manques dans les tests unitaires)
author: Vincent Dubois
date: 12 fevrier 2009

Instance Method Summary collapse

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
# File 'lib/zentest_builder.rb', line 20

def build(project_name, auto_install, proxy_option)
  # On verifie la presence de ZenTest
  Utils.verify_gem_presence("ZenTest", auto_install, proxy_option)
  # On lance la generation
  puts " Building ZenTest report..."
  zentest_report = File.open("#{Continuous4r::WORK_DIR}/zentest-body.html", "w")
  zentest_report.write(ZenTestFormatter.new.to_html)
  zentest_report.close
end

#prerequisite_met?Boolean

Prérequis à la tâche

Returns:

  • (Boolean)


10
11
12
# File 'lib/zentest_builder.rb', line 10

def prerequisite_met?
  Dir.glob("test/**/*.rb").length > 0
end

#prerequisite_unmet_messageObject

Dans le cas de l’erreur de prérequis



15
16
17
# File 'lib/zentest_builder.rb', line 15

def prerequisite_unmet_message
  " No tests found. The 'ZenTest' task will be empty."
end