Sha256: 44fb7f7a76157771d82caae66576cf6c08fd138802f5178451d4f7cbd4429d15

Contents?: true

Size: 636 Bytes

Versions: 12

Compression:

Stored size: 636 Bytes

Contents

module Matest
  class Runner
    attr_reader :example_groups
    attr_reader :info
    attr_reader :printer

    def initialize(options={})
      @example_groups = []
      @info           = {}
      @printer        = options[:printer] || SpecPrinter.new
    end

    def self.runner
      @runner ||= new
    end

    def <<(example_group)
      example_group.printer = printer
      example_groups << example_group
    end

    def load_file(file)
      require(file)
    end

    def execute!
      example_groups.each do |current_group|
        current_group.execute!
      end
      printer.print_messages(self)
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
matest-1.6.6 lib/matest/runner.rb
matest-1.6.5 lib/matest/runner.rb
matest-1.6.4 lib/matest/runner.rb
matest-1.6.3 lib/matest/runner.rb
matest-1.6.2 lib/matest/runner.rb
matest-1.6.1 lib/matest/runner.rb
matest-1.6.0 lib/matest/runner.rb
matest-1.5.6 lib/matest/runner.rb
matest-1.5.5 lib/matest/runner.rb
matest-1.5.4 lib/matest/runner.rb
matest-1.5.3 lib/matest/runner.rb
matest-1.5.2 lib/matest/runner.rb