Sha256: 9613517910fb6555a0f63e563951a4d70f934246a78c6b40a91be71568eda7d4

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

module Rgot
  class M
    def initialize(cases, opts)
      @cases = cases
      @opts = opts
    end

    def run
      test_ok = run_tests
      if !test_ok
        puts "FAIL"
        1
      else
        puts "PASS"
        0
      end
    end

    private

    def run_tests
      ok = true
      @cases.each do |test|
        t = Rgot::T.new(test.module, test.name.to_sym, @opts)
        if @opts[:verbose]
          puts "=== RUN #{test.name}\n"
        end
        t.run
        t.report
        if t.failed?
          ok = false
        end
      end
      ok
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rgot-0.0.1 lib/rgot/m.rb