Class: Buildr::Tests
- Inherits:
-
Object
- Object
- Buildr::Tests
- Defined in:
- lib/java/test.rb
Instance Method Summary collapse
- #compile(*sources, &block) ⇒ Object
- #junit(*tasks, &block) ⇒ Object
- #prepare(*tasks, &block) ⇒ Object
- #resources(*tasks, &block) ⇒ Object
Instance Method Details
#compile(*sources, &block) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/java/test.rb', line 39 def compile(*sources, &block) unless @compile_task @compile_task = Java::CompileTask.define_task("compile"=>prepare) { |task| resources.invoke } end returning(@compile_task) { |task| task.sources |= sources ; task.enhance &block } end |
#junit(*tasks, &block) ⇒ Object
50 51 52 53 54 55 |
# File 'lib/java/test.rb', line 50 def junit(*tasks, &block) unless @junit_task @junit_task = JUnitTask.define_task("junit"=>compile) end returning(@junit_task) { |task| task.enhance tasks, &block } end |
#prepare(*tasks, &block) ⇒ Object
35 36 37 |
# File 'lib/java/test.rb', line 35 def prepare(*tasks, &block) returning(@prepare_task ||= task("prepare")) { |task| task.enhance tasks, &block } end |
#resources(*tasks, &block) ⇒ Object
46 47 48 |
# File 'lib/java/test.rb', line 46 def resources(*tasks, &block) returning(@resources_task ||= Filter.define_task("resources")) { |task| task.enhance tasks, &block } end |