Class: Buffet::Runner
- Inherits:
-
Object
- Object
- Buffet::Runner
- Defined in:
- lib/buffet/runner.rb
Instance Method Summary collapse
- #example_failed ⇒ Object
- #example_passed ⇒ Object
- #example_pending ⇒ Object
- #failures? ⇒ Boolean
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #run(specs = nil) ⇒ Object
- #slave_finished(slave) ⇒ Object
- #slave_prepared(slave) ⇒ Object
- #spec_taken(slave, spec_file) ⇒ Object
Constructor Details
Instance Method Details
#example_failed ⇒ Object
37 38 39 40 |
# File 'lib/buffet/runner.rb', line 37 def example_failed print 'F'.red STDOUT.flush end |
#example_passed ⇒ Object
32 33 34 35 |
# File 'lib/buffet/runner.rb', line 32 def example_passed print '.'.green STDOUT.flush end |
#example_pending ⇒ Object
42 43 44 45 |
# File 'lib/buffet/runner.rb', line 42 def example_pending print '*'.yellow STDOUT.flush end |
#failures? ⇒ Boolean
51 52 53 |
# File 'lib/buffet/runner.rb', line 51 def failures? @master.failures.any? end |
#run(specs = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/buffet/runner.rb', line 10 def run specs = nil @specs = specs raise 'No specs found' if @specs.empty? @slaves = Settings.slaves raise 'No slaves defined in settings.yml' if @slaves.empty? Buffet.logger.info "Starting Buffet test run" puts "Running Buffet..." run_tests display_results end |
#slave_finished(slave) ⇒ Object
47 48 49 |
# File 'lib/buffet/runner.rb', line 47 def slave_finished slave Buffet.logger.info "#{slave.name} finished" end |