Class: FlakyTester::TestRunner
- Inherits:
-
Object
- Object
- FlakyTester::TestRunner
- Defined in:
- lib/flaky_tester/test_runner.rb
Instance Method Summary collapse
-
#initialize ⇒ TestRunner
constructor
A new instance of TestRunner.
- #run(options) ⇒ Object
Constructor Details
#initialize ⇒ TestRunner
Returns a new instance of TestRunner.
7 8 9 |
# File 'lib/flaky_tester/test_runner.rb', line 7 def initialize @results = Tempfile.new end |
Instance Method Details
#run(options) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/flaky_tester/test_runner.rb', line 11 def run() command = build_command() total_runs = [:times] for current_run in (1..total_runs) print("Running #{current_run}/#{total_runs}...\r") command_succeeded = system(command) raise(Errors::RspecError) unless command_succeeded end @results end |