summaryrefslogtreecommitdiff
path: root/spec/ruby/library/digest/md5/hexdigest_bang_spec.rb
blob: a953eb3b4ca7188f6b28605678eadf4af6585518 (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::MD5#hexdigest!" do

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

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

end