Sha256: 6d6d4daa4d7019bbe22a1b295f0d21c6bfb92d9a00fe3f3222029458ac238832
Contents?: true
Size: 751 Bytes
Versions: 2
Compression:
Stored size: 751 Bytes
Contents
require 'spec_helper' module Text module Checkm describe :checksum do it 'calculates the checksum' do file = 'spec/data/test_1/1' expected = { 'md5' => 'b026324c6904b2a9cb4b88d6d61c81d1', 'sha1' => 'e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e', 'sha256' => '4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865' } aggregate_failures 'checksums' do expected.each do |alg, checksum| File.open(file, 'r') do |f| actual = Checkm.checksum(f, alg) expect(actual).to eq(checksum), "Wrong #{alg} checksum for #{file}, expected #{checksum}, was #{actual}" end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
text-checkm-0.8 | spec/lib/text/checkm/checksum_spec.rb |
text-checkm-0.7 | spec/lib/text/checkm/checksum_spec.rb |