Module: FuzzBert::AutoRun

Defined in:
lib/fuzzbert/autorun.rb

Constant Summary collapse

TEST_CASES =
[]

Class Method Summary collapse

Class Method Details

.autorunObject



13
14
15
16
17
# File 'lib/fuzzbert/autorun.rb', line 13

def autorun
  options, files = process_args(ARGV)
  load_files(files)
  run(options)
end

.register(suite) ⇒ Object



9
10
11
# File 'lib/fuzzbert/autorun.rb', line 9

def register(suite)
  TEST_CASES << suite
end

.run(options = nil) ⇒ Object



19
20
21
22
# File 'lib/fuzzbert/autorun.rb', line 19

def run(options=nil)
  raise RuntimeError.new "No test cases were found" if TEST_CASES.empty?
  FuzzBert::Executor.new(TEST_CASES, options).run
end