Class: CIAT::RakeTask
- Inherits:
-
Object
- Object
- CIAT::RakeTask
- Defined in:
- lib/ciat/rake_task.rb
Overview
A Rake Task for a Suite of Tests
This is the class to use in your Rakefile
. The simplest use looks like this:
CIAT::RakeTask(:name_of_task) do |t|
t.processors << compiler
t.processors << executor
end
Define compiler
and executor
in the Rakefile
to return a compiler and executor, respectively. :name_of_task
is (as I try to make clear by its name) the name of the rake task. If you leave out this name, it defaults to :ciat
. The options on t
correspond directly to the options of CIAT::Suite. See CIAT::Suite for defaults and details.
-
t.processors
is required and specifies the processors to be executed; order matters! Use=
to assign a list of processors; use<<
to push processors onto the existing list of processors. -
t.folder
specifies folders to search for test files. -
t.files
is an array of specific files. -
t.report_filename
is the name of the report -
t.feedback
specifies a feedback mechanism
Instance Attribute Summary collapse
-
#feedback ⇒ Object
Returns the value of attribute feedback.
-
#files ⇒ Object
Returns the value of attribute files.
-
#folder ⇒ Object
Returns the value of attribute folder.
-
#output_folder ⇒ Object
Returns the value of attribute output_folder.
-
#processors ⇒ Object
Returns the value of attribute processors.
-
#report_filename ⇒ Object
Returns the value of attribute report_filename.
-
#report_title ⇒ Object
Returns the value of attribute report_title.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = :ciat) {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize(name = :ciat) {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
35 36 37 38 39 40 |
# File 'lib/ciat/rake_task.rb', line 35 def initialize(name = :ciat) @name = name @processors = [] yield self if block_given? define end |
Instance Attribute Details
#feedback ⇒ Object
Returns the value of attribute feedback.
29 30 31 |
# File 'lib/ciat/rake_task.rb', line 29 def feedback @feedback end |
#files ⇒ Object
Returns the value of attribute files.
28 29 30 |
# File 'lib/ciat/rake_task.rb', line 28 def files @files end |
#folder ⇒ Object
Returns the value of attribute folder.
30 31 32 |
# File 'lib/ciat/rake_task.rb', line 30 def folder @folder end |
#output_folder ⇒ Object
Returns the value of attribute output_folder.
33 34 35 |
# File 'lib/ciat/rake_task.rb', line 33 def output_folder @output_folder end |
#processors ⇒ Object
Returns the value of attribute processors.
27 28 29 |
# File 'lib/ciat/rake_task.rb', line 27 def processors @processors end |
#report_filename ⇒ Object
Returns the value of attribute report_filename.
31 32 33 |
# File 'lib/ciat/rake_task.rb', line 31 def report_filename @report_filename end |
#report_title ⇒ Object
Returns the value of attribute report_title.
32 33 34 |
# File 'lib/ciat/rake_task.rb', line 32 def report_title @report_title end |
Instance Method Details
#define ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ciat/rake_task.rb', line 42 def define desc "Run CIAT tests" + (@name==:test ? "" : ", #{@name}") task @name do suite = CIAT::Suite.new( :processors => @processors, :files => @files, :feedback => @feedback, :folder => @folder, :report_filename => @report_filename, :output_folder => @output_folder, :report_title => @report_title) suite.run end end |