Class: Kintama::Runner::Base
- Inherits:
-
Object
- Object
- Kintama::Runner::Base
- Defined in:
- lib/kintama/runner.rb
Instance Attribute Summary collapse
-
#runnables ⇒ Object
readonly
Returns the value of attribute runnables.
Instance Method Summary collapse
- #failures ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #passed? ⇒ Boolean
- #pending ⇒ Object
- #run(reporter = Kintama::Reporter.default) ⇒ Object
- #with(*runnables) ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/kintama/runner.rb', line 11 def initialize @runnables = [] end |
Instance Attribute Details
#runnables ⇒ Object (readonly)
Returns the value of attribute runnables.
9 10 11 |
# File 'lib/kintama/runner.rb', line 9 def runnables @runnables end |
Instance Method Details
#failures ⇒ Object
32 33 34 |
# File 'lib/kintama/runner.rb', line 32 def failures @ran_runnables.map { |r| r.failures }.flatten end |
#passed? ⇒ Boolean
28 29 30 |
# File 'lib/kintama/runner.rb', line 28 def passed? failures.empty? end |
#pending ⇒ Object
36 37 38 |
# File 'lib/kintama/runner.rb', line 36 def pending @ran_runnables.map { |r| r.pending }.flatten end |
#run(reporter = Kintama::Reporter.default) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/kintama/runner.rb', line 20 def run(reporter=Kintama::Reporter.default) reporter.started(self) @ran_runnables = run_tests(reporter) reporter.finished reporter.show_results passed? end |
#with(*runnables) ⇒ Object
15 16 17 18 |
# File 'lib/kintama/runner.rb', line 15 def with(*runnables) @runnables = runnables self end |