class Matest::Runner
Attributes
example_groups[R]
info[R]
printer[R]
Public Class Methods
new(options={})
click to toggle source
# File lib/matest/runner.rb, line 7 def initialize(options={}) @example_groups = [] @info = {} @printer = options[:printer] || SpecPrinter.new end
runner()
click to toggle source
# File lib/matest/runner.rb, line 13 def self.runner @runner ||= new end
Public Instance Methods
<<(example_group)
click to toggle source
# File lib/matest/runner.rb, line 17 def <<(example_group) example_group.printer = printer example_groups << example_group end
execute!()
click to toggle source
# File lib/matest/runner.rb, line 31 def execute! example_groups.each do |current_group| current_group.execute! end printer.print_messages(self) end
load_file(file)
click to toggle source
# File lib/matest/runner.rb, line 22 def load_file(file) location = file.split(":") if location.count == 1 require(file) else require_spec(*location) end end
Private Instance Methods
require_spec(file, line)
click to toggle source
# File lib/matest/runner.rb, line 40 def require_spec(file, line) require file end