lib/sprout/tasks/mxmlc_unit.rb in sprout-as3-bundle-0.2.3 vs lib/sprout/tasks/mxmlc_unit.rb in sprout-as3-bundle-0.2.9

- old
+ new

@@ -1,19 +1,35 @@ module Sprout - class MXMLCUnit < MXMLCHelper # :nodoc: + + # The MXMLCUnit helper wraps up fdb and mxmlc unit test tasks by + # using either a Singleton or provided ProjectModel instance. + # + # The simple case that uses a Singleton ProjectModel: + # unit :test + # + # Using a ProjectModel instance: + # project_model :model + # + # unit :test => :model + # + # Configuring the proxy MXMLCTask + # unit :test do |t| + # t.link_report = 'LinkReport.rpt' + # end + # + class MXMLCUnit < MXMLCHelper + def initialize(args, &block) super - t = define_outer_task - t.prerequisites << player_task_name - library :asunit3 mxmlc output do |t| configure_mxmlc t configure_mxmlc_application t + t.debug = true t.prerequisites << :asunit3 t.source_path << model.test_dir if(model.test_width && model.test_height) t.default_size = "#{model.test_width} #{model.test_height}" @@ -21,10 +37,12 @@ yield t if block_given? end define_player - return output + t = define_outer_task + t.prerequisites << output + t.prerequisites << player_task_name end def create_output return "#{create_output_base}Runner.swf" end