Class: Sprout::MXMLCUnit
- Inherits:
-
MXMLCHelper
- Object
- MXMLCHelper
- Sprout::MXMLCUnit
- Defined in:
- lib/sprout/tasks/mxmlc_unit.rb
Overview
The MXMLCUnit helper wraps up flashplayer 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
Instance Attribute Summary
Attributes inherited from MXMLCHelper
Instance Method Summary collapse
- #create_input ⇒ Object
- #create_output ⇒ Object
-
#initialize(args, &block) ⇒ MXMLCUnit
constructor
A new instance of MXMLCUnit.
Methods inherited from MXMLCHelper
#input, #output, #prerequisites, #task_name
Constructor Details
#initialize(args, &block) ⇒ MXMLCUnit
Returns a new instance of MXMLCUnit.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/sprout/tasks/mxmlc_unit.rb', line 23 def initialize(args, &block) super library :asunit3 mxmlc output do |t| configure_mxmlc t configure_mxmlc_application t t.debug = true t.source_path << model.test_dir t.prerequisites << :asunit3 if(model.test_width && model.test_height) t.default_size = "#{model.test_width} #{model.test_height}" end yield t if block_given? end define_player t = define_outer_task t.prerequisites << output t.prerequisites << player_task_name end |
Instance Method Details
#create_input ⇒ Object
51 52 53 54 55 |
# File 'lib/sprout/tasks/mxmlc_unit.rb', line 51 def create_input input = super input.gsub!(/#{input_extension}$/, "Runner#{input_extension}") return input end |
#create_output ⇒ Object
47 48 49 |
# File 'lib/sprout/tasks/mxmlc_unit.rb', line 47 def create_output return "#{create_output_base}Runner.swf" end |