Module: Edfize::Tests::CheckLength
- Included in:
- Edfize::Tests
- Defined in:
- lib/edfize/tests/check_length.rb
Instance Method Summary collapse
-
#test_expected_length(runner) ⇒ Object
This test checks that the length calculated from the EDF header matches the total length of the file.
Instance Method Details
#test_expected_length(runner) ⇒ Object
This test checks that the length calculated from the EDF header matches the total length of the file
8 9 10 11 12 13 14 15 |
# File 'lib/edfize/tests/check_length.rb', line 8 def test_expected_length(runner) result = Result.new result.passes = (runner.edf.expected_edf_size == runner.edf.edf_size) result.pass_fail = " #{result.passes ? 'PASS' : 'FAIL'}".colorize(result.passes ? :green : :red) + ' Expected File Size' result.expected = " Expected : #{runner.edf.expected_edf_size} bytes" result.actual = " Actual : #{runner.edf.edf_size} bytes" result end |