Sha256: 1b2e30d48e52875571aacb6231e17d864398580bf03dbaf991955d96149a0bca

Contents?: true

Size: 951 Bytes

Versions: 8

Compression:

Stored size: 951 Bytes

Contents

class Runner
  def initialize()
    self.specs = []
    self.halt = false
    self.stopped = false
    self.bail = false
    self.tag = ''
  end

  defm set_bail(bail)
    self.bail = bail
  end

  defm get_bail()
    return self.bail
  end

  defm set_tag(tag)
    self.tag = tag
  end

  defm get_tag()
    return self.tag
  end

  defm add(spec)
    add(self.specs, spec)
    return spec
  end

  defm start(reporter, stats)
    reporter.on_start(stats)

    timer = new SpecTimer()
    timer.start()

    for spec in self.specs
      if self.stopped
        break
      end

      spec_runner = new SpecRunner(spec)
      spec_runner.set_bail(self.get_bail())
      spec_runner.set_tag(self.get_tag())
      spec_runner.start(reporter, stats)

      if spec_runner.has_bailed()
        self.stopped = true
      end
    end

    timer.stop()
    reporter.on_end(timer.get_duration(), stats)
  end

  defm stop()
    self.stopped = true
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
speckle-0.1.26 lib/runners/runner.riml
speckle-0.1.25 lib/runners/runner.riml
speckle-0.1.24 lib/runners/runner.riml
speckle-0.1.23 lib/runners/runner.riml
speckle-0.1.22 lib/runners/runner.riml
speckle-0.1.21 lib/runners/runner.riml
speckle-0.1.20 lib/runners/runner.riml
speckle-0.1.19 lib/runners/runner.riml