Class: FlakyTester

Inherits:
Object
  • Object
show all
Defined in:
lib/flaky_tester.rb,
lib/flaky_tester/test_runner.rb,
lib/flaky_tester/command_parser.rb,
lib/flaky_tester/results_parser.rb,
lib/flaky_tester/test_runner/errors/rspec_error.rb,
lib/flaky_tester/command_parser/errors/invalid_times.rb

Defined Under Namespace

Classes: CommandParser, ResultsParser, TestRunner

Instance Method Summary collapse

Constructor Details

#initialize(command_args = []) ⇒ FlakyTester

Returns a new instance of FlakyTester.



6
7
8
# File 'lib/flaky_tester.rb', line 6

def initialize(command_args = [])
  @command_args = command_args
end

Instance Method Details

#testObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/flaky_tester.rb', line 10

def test
  command_parser = CommandParser.new(@command_args)
  command_options = command_parser.parse

  test_runner = TestRunner.new(command_options)
  results_file = test_runner.run

  results_parser = ResultsParser.new(results_file)
  results_message = results_parser.parse

  puts(results_message)
rescue => error
  puts(error)
  puts(command_parser)
rescue SystemExit
  # do nothing
end