Class: Henry::Task::RspecTask
- Inherits:
-
RakeTask
- Object
- Henry::Task
- RakeTask
- Henry::Task::RspecTask
- Defined in:
- lib/henry/task/rspec_task.rb
Overview
The Henry Task implementation for Rspec
Constant Summary collapse
- OUT_PATH =
The temporary output file path for the RspecTask execution.
'rspec.out'
- REPORTS_DIR =
The reports path template.
'.henry/reports/${FORMAT}'
- TIME_FORMAT =
Default time format to be used in the reports filepath.
'%Y-%m-%dT%H%M%S'
- APPLICATION_NAME =
The Rspec Rake Application name.
'spec'
Instance Attribute Summary
Attributes inherited from Henry::Task
Instance Method Summary collapse
- #application_name ⇒ Object
-
#configure(params, extended_context = {}) ⇒ Object
Configures the Task.
- #out_path ⇒ Object
Methods inherited from RakeTask
Methods inherited from Henry::Task
#after_execute, #before_execute, create, #disable!, #disabled?, #enable!, #enabled?, #execute, #execution, #export_params, #initialize, #logger, #report
Constructor Details
This class inherits a constructor from Henry::Task
Instance Method Details
#application_name ⇒ Object
25 26 27 |
# File 'lib/henry/task/rspec_task.rb', line 25 def application_name APPLICATION_NAME end |
#configure(params, extended_context = {}) ⇒ Object
Configures the Task.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/henry/task/rspec_task.rb', line 37 def configure(params, extended_context={}) File.open(OUT_PATH, 'w') { |f| } # Makes available the spec rake task. Rake.application.clear RSpec::Core::RakeTask.new do |t| if self.data. t.pattern = self.data.['pattern'] || 'spec/*' t.rspec_opts = "#{self.} #{extended_context['options']}" else t.pattern = 'spec/*' t.rspec_opts = "#{self.} #{extended_context['options']}" end end self.export_params(params) end |
#out_path ⇒ Object
29 30 31 |
# File 'lib/henry/task/rspec_task.rb', line 29 def out_path OUT_PATH end |