Class: TestBench::Run::Summary::FileTotals

Inherits:
Struct
  • Object
show all
Defined in:
lib/test_bench/run/summary.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aborted_countObject

Returns the value of attribute aborted_count

Returns:

  • (Object)

    the current value of aborted_count



427
428
429
# File 'lib/test_bench/run/summary.rb', line 427

def aborted_count
  @aborted_count
end

#attempted_countObject

Returns the value of attribute attempted_count

Returns:

  • (Object)

    the current value of attempted_count



427
428
429
# File 'lib/test_bench/run/summary.rb', line 427

def attempted_count
  @attempted_count
end

#completed_countObject

Returns the value of attribute completed_count

Returns:

  • (Object)

    the current value of completed_count



427
428
429
# File 'lib/test_bench/run/summary.rb', line 427

def completed_count
  @completed_count
end

#not_found_countObject

Returns the value of attribute not_found_count

Returns:

  • (Object)

    the current value of not_found_count



427
428
429
# File 'lib/test_bench/run/summary.rb', line 427

def not_found_count
  @not_found_count
end

Class Method Details

.initialObject



428
429
430
# File 'lib/test_bench/run/summary.rb', line 428

def self.initial
  new(0, 0, 0, 0)
end

Instance Method Details

#abortedObject



461
462
463
# File 'lib/test_bench/run/summary.rb', line 461

def aborted
  "%i aborted" % aborted_count
end

#aborted?Boolean

Returns:

  • (Boolean)


457
458
459
# File 'lib/test_bench/run/summary.rb', line 457

def aborted?
  aborted_count > 0
end

#attemptedObject



449
450
451
# File 'lib/test_bench/run/summary.rb', line 449

def attempted
  "%i file#{'s' if attempted_count != 1}" % attempted_count
end

#completedObject



453
454
455
# File 'lib/test_bench/run/summary.rb', line 453

def completed
  "%i completed" % completed_count
end

#not_foundObject



469
470
471
# File 'lib/test_bench/run/summary.rb', line 469

def not_found
  "%i not found" % not_found_count
end

#not_found?Boolean

Returns:

  • (Boolean)


465
466
467
# File 'lib/test_bench/run/summary.rb', line 465

def not_found?
  not_found_count > 0
end

#record_file_abortedObject



440
441
442
# File 'lib/test_bench/run/summary.rb', line 440

def record_file_aborted
  self.aborted_count += 1
end

#record_file_completedObject



436
437
438
# File 'lib/test_bench/run/summary.rb', line 436

def record_file_completed
  self.completed_count += 1
end

#record_file_not_foundObject



444
445
446
447
# File 'lib/test_bench/run/summary.rb', line 444

def record_file_not_found
  self.attempted_count += 1
  self.not_found_count += 1
end

#record_file_queuedObject



432
433
434
# File 'lib/test_bench/run/summary.rb', line 432

def record_file_queued
  self.attempted_count += 1
end