Class: Kintama::Runner::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kintama/runner.rb

Direct Known Subclasses

Default, Line

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



11
12
13
# File 'lib/kintama/runner.rb', line 11

def initialize
  @runnables = []
end

Instance Attribute Details

#runnablesObject (readonly)

Returns the value of attribute runnables.



9
10
11
# File 'lib/kintama/runner.rb', line 9

def runnables
  @runnables
end

Instance Method Details

#failuresObject



32
33
34
# File 'lib/kintama/runner.rb', line 32

def failures
  @ran_runnables.map { |r| r.failures }.flatten
end

#passed?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/kintama/runner.rb', line 28

def passed?
  failures.empty?
end

#pendingObject



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