Class: Shenandoah::Tasks
- Inherits:
-
Object
- Object
- Shenandoah::Tasks
- Defined in:
- lib/shenandoah/tasks.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#locator ⇒ Object
Returns the value of attribute locator.
-
#options ⇒ Object
Returns the value of attribute options.
-
#runner ⇒ Object
Returns the value of attribute runner.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Tasks
constructor
A new instance of Tasks.
- #run_specs ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Tasks
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/shenandoah/tasks.rb', line 9 def initialize( = {}) = @locator = if [:locator] [:locator] else default_locator_type.new() end @runner = Shenandoah::Runner.new(@locator) create_serve_task create_shell_task create_run_task end |
Instance Attribute Details
#locator ⇒ Object
Returns the value of attribute locator.
7 8 9 |
# File 'lib/shenandoah/tasks.rb', line 7 def locator @locator end |
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/shenandoah/tasks.rb', line 7 def end |
#runner ⇒ Object
Returns the value of attribute runner.
7 8 9 |
# File 'lib/shenandoah/tasks.rb', line 7 def runner @runner end |
Instance Method Details
#run_specs ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/shenandoah/tasks.rb', line 23 def run_specs files = @locator.spec_files if ENV['SHEN_SPEC'] files = files.select { |f| f =~ /#{ENV['SHEN_SPEC']}/ } end successes = @runner.run_console(files) if (successes.size != files.size) raise "Shenandoah specs failed!" end end |