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
# File 'lib/fuzzbert/autorun.rb', line 13

def autorun
  autorun_with_args(ARGV)
end

.autorun_with_args(argv) ⇒ Object



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

def autorun_with_args(argv)
  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



23
24
25
26
# File 'lib/fuzzbert/autorun.rb', line 23

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