summaryrefslogtreecommitdiff
path: root/spec/ruby/library/digest/sha512/hexdigest_bang_spec.rb
blob: e9b0da619126d1c28f9b47ff151d5d49fd56e99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_relative '../../../spec_helper'
require_relative 'shared/constants'

describe "Digest::SHA512#hexdigest!" do

  it "returns a hexdigest and resets the state" do
    cur_digest = Digest::SHA512.new

    cur_digest << SHA512Constants::Contents
    cur_digest.hexdigest!.should == SHA512Constants::Hexdigest
    cur_digest.hexdigest.should == SHA512Constants::BlankHexdigest
  end

end