Sha256: a906cf90c2576291d7e9c253450d4197b228ee5d91a1fc0c315efc6017195016

Contents?: true

Size: 582 Bytes

Versions: 1

Compression:

Stored size: 582 Bytes

Contents

require 'spec_helper'
require 'eff/verifier'

describe Eff::Verifier do
  let(:file) { "spec/support/static_file_for_digesting.txt" }
  let(:sha1) { "75cfdde12aeb435fd0c68c99df1027190953997e" }
  let(:md5)  { "1c0b1fcddc0cd9677ecfb79e1d127e03" }

  it 'returns true if the hashes match' do
    Eff::Verifier.check(file, sha1).should be_true
  end

  it 'returns false if the hashes do not match' do
    Eff::Verifier.check(file, "this doesn't match").should_not be_true
  end

  it 'can validate with md5' do
    Eff::Verifier.check(file, md5, Digest::MD5).should be_true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eff-0.0.1 spec/verifier_spec.rb