Class: Dragnet::Verifier
- Inherits:
-
Object
- Object
- Dragnet::Verifier
- Defined in:
- lib/dragnet/verifier.rb
Overview
Executes the verification process on the given Test Records
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#test_records ⇒ Object
readonly
Returns the value of attribute test_records.
Instance Method Summary collapse
-
#initialize(test_records:, repository:, logger:) ⇒ Verifier
constructor
Creates a new instance of the class.
-
#verify ⇒ Object
Runs the verify process After the execution of this method each Test Record will get a
:result
key with the result of the verification process.
Constructor Details
#initialize(test_records:, repository:, logger:) ⇒ Verifier
Creates a new instance of the class.
17 18 19 20 21 |
# File 'lib/dragnet/verifier.rb', line 17 def initialize(test_records:, repository:, logger:) @test_records = test_records @repository = repository @logger = logger end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
10 11 12 |
# File 'lib/dragnet/verifier.rb', line 10 def logger @logger end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/dragnet/verifier.rb', line 10 def path @path end |
#test_records ⇒ Object (readonly)
Returns the value of attribute test_records.
10 11 12 |
# File 'lib/dragnet/verifier.rb', line 10 def test_records @test_records end |
Instance Method Details
#verify ⇒ Object
Runs the verify process After the execution of this method each Test Record will get a :result
key with the result of the verification process. This key contains a hash like the following:
result: {
status: :passed, # Either :passed, :failed or :skipped
reason: 'String' # The reason for the failure (for :failed and :skipped)
}
32 33 34 35 36 37 38 |
# File 'lib/dragnet/verifier.rb', line 32 def verify logger.info 'Verifying MTR files...' test_records.each do |test_record| logger.info "Verifying #{test_record.source_file}" verify_mtr(test_record) end end |